|
Is there anyway to make only 1 of my animations on my character loop? I thought about this as a script and looked it up on Google but I couldn't find anything, is it possible or is there some other way?
(comments are locked)
|
|
to make it easier,, Why don't you just set the animation to a loop When you put the KeyFrames in,, Then use a simple activate animation script something like,, function Update () { if(Input.GetKey("s")) animation.Play("walk_backwards"); { Hope This helped :)
(comments are locked)
|
|
Try adding this to OnStart: Where would I add this? This is my script function OnStart () { if ( Input.GetButtonDown("S") ) { transform.animation.Play("walk_backwards"); } }
Oct 24 '11 at 09:17 PM
Dreave
You're not going to want to get input in Onstart. You should be doing that in one of the update functions. The code above will simply set the specific animation to play in a loop. If you are looking at how to control the animation you will want to look at the animation section of the documentation: http://unity3d.com/support/documentation/Manual/Animation%20Scripting.html It has some great examples.
Oct 24 '11 at 09:29 PM
gruhm
the documentation basically says the same sort of thing that you have said, I have tried quite a few different scripts with help from the documentation but non of them do anything, please can you help?
Oct 25 '11 at 08:08 PM
Dreave
(comments are locked)
|
