#Code Help, Animation Switching

1 messages · Page 1 of 1 (latest)

fierce wasp
#

Hey guys , I started my first unity project, and I have a problem , I initialized the bool which setted up in the animator ! jumping , from idle to jumping true , backwards false … this is right , but the animator doesn’t switch between these animations ?? Even the bool are right setted in Debug.Log??

Thanks in Advance!

shut inlet
#

Hmm

fierce wasp
shut inlet
#

are you using 3D

fierce wasp
shut inlet
#

first person game?

fierce wasp
#

Nope 3rd person

shut inlet
#

oh

#

I have a code for it

#

you can have it

fierce wasp
#

Would be nice ye! Thank you

#

I only need to know why the animator doesn’t switch , even I did it right

shut inlet
#

speed

#

if the speed is too fast, it looks normal

#

or the target

fierce wasp
#

Speed is 1 … but iam all the time in the idle animation …

shut inlet
fierce wasp
#

Thank you!

shut inlet
#

and wait for me for the tutorial

#

just move the camera and remix the code

#

it will be fine

fierce wasp
#

Alr, thank you very much !

shut inlet
#

you're welcome

short coral
#

Im starting coding and have a basic movement model here

using UnityEngine;

public class PlayerMovement : MonoBehaviour
{

private void Awake()
{
    body = GetComponent<Rigidbody2D>();
}

private void Update()
{
    body.velocity = new Vector2(Input.GetAxis("Horizontal"), body.velocity.y);
}

}

#

but its saying this

#

is this because im following an old version tutorial or what?

shut inlet
#

yes

#

it's AddForce(Input.GetAxis("Horizontal"))

#

i think...