- Home /
Answer by Mmmpies · Jan 26, 2015 at 11:29 AM
Ha just worked out this is already posted @isaacj11 and not it moderation. I really shouldn't work on a phone as I miss too much obvious stuff.
OK not an expert on the legacy animator but if the other animations are working can't you just do this:
if ( rotateJoystick.tapCount == 2 )
{
// Apply the current movement to launch velocity
velocity = character.velocity;
velocity.y = jumpSpeed;
animation.CrossFade("jump");
}
You could even copy the needed lines into your movement script to keep it all neat.
NullReferenceException: Object reference not set to an instance of an object CharacterAnimation.Update () (at Assets/Scripts/CharacterAnimation.js:44) I think line 44
So the only things on that line that can possibly be causing the error are rotateJoystick or tapCount, look in the original file and search for all references to those items.
Copy the way they're referenced from that script. Or leave the full script in place and just add your animation to it.
how do I do it :(, do you want me to send a demo model with run and jump animations and can you implement those into unity with this script and try it out? can you please find a solution for me?
Not got access to Unity AT$$anonymous$$ but post any line in the jump script from that dual joystick that includes either rotateJoystick or tapCount.
I suspect rotateJoystick is the one that's causing it but post those lines and I'll show you which ones are needed to add to your script.