|
Hello, I'm very new to scripting but I've managed to get a character set up with the locomotion system and I'm trying to add a "jump" animation. The character also has the following components: Alignment Tracker Character Motor Character Controller Player Controller (that I've adapted from the Bootcamp "soldier controller") Player Animations (that I've adapted from the Bootcamp "soldier animations" script) I've managed to toggle between 2 of locomotion system's "animation groups" by including the following in my Player Controller script's "GetUserInputs()" function: And I can play a jump animation by adding the following to the same function: However, there is a real problem here. When the jump animation finishes, the player just slides around in the first frame of the "jump" animation until a) I press jump again (it plays "jump" and then starts skating again) b) I press the crouch button (when it rturns to normal locomotion system crouch mode) I can't work out how to tell the character to automatically go back to the locomotion system "stand" mode after it finishes the "jump" animation. Can anyone point me in the right direction? EDIT: I thought I'd found a way round this, but I then ran into trouble when trying to add AddMixingTransforms (to animate just the upper body). The new script looks like this: animation["reload"].AddMixingTransform(mixTransform); animation["reload"].wrapMode = WrapMode.Once; }
(comments are locked)
|
