#How do i fix this?

1 messages · Page 1 of 1 (latest)

unreal rune
#

Hey!
I am trying to animate a 2D player with the brackeys tutorial but for some reason when i do exact thing it says that i've done something wrong.
Can anyone please explain?

rich steeple
#

Mathf.Abs takes a float.
You are giving it a Vector2.
You will need to get a float from that vector in one way or another; likely what you want is velocity.x.
velocity.y and velocity.magnitude would aldo be possible contenders.

unreal rune
#

I only recently started learning unity so i dont know alot abt it

rich steeple
rich steeple
unreal rune
rich steeple
#

Have you read the error message?

unreal rune
#

but its fixed now

#

tysm

rich steeple
rich steeple
# unreal rune tysm

You're welcome 🙂

Do you understand why the change I suggested fixed it?