|
Can anyone supply a javascript example for controlling let's say a box with the GUI Slider function? And I mean baked animation from 3D Max is assigned to the box object but I need the animation to be controlled by the float values from the slider. Ex - Box is animated in 3D max and moves from 0,0,0 to 0,20,0. This is exported as FBX. Import Box with animation to Unity and then have horizontal GUI slider affect the animation of the box, whereas float 0 = 0,0,0 and float 10= 0,20,0. Hope that makes sense.
(comments are locked)
|
|
Well, just take the example from the GUI slider reference and from Animation.Sample and you're done. Excellent! Thanks for the quick response! I'm not a coder but learning.
Apr 19 '11 at 09:07 PM
Sean 14
(comments are locked)
|
|
Hi Bunny83 Thanks for the helpful gui slider example. I am trying take this script a bit further and being a novice both with Unity and scripting I'm having some problems figuring it out. I actually am not sure if what I'm trying to do is feasible What I would like to do is have the slider control the playback of multiple AnimationClips So, rather then specify a particular AnimationClip in the script I am trying to create and AnimationClip array and link the AnimationStates of the the various clips to the hSliderValue. I am trying to use this example [http://docs.unity3d.com/Documentation/ScriptReference/Animation.html][1] I tried amending your script like so Ideas? Thanks!!
(comments are locked)
|
