All Questions

Community

n
mateo nadal

Cant convert movement to 3d

Making top down game, deleted air transitions, transitions between run and idle states show on the debugger but velocity is always 0.

I modified the variables:

export var max_speed_default: = Vector2(500.0, 500.0)

export var acceleration_default: = Vector2(100000, 100000)


and added y input to the move direction function:

Input.get_action_strength("move_right") - Input.get_action_strength("move_left"), Input.get_action_strength("move_down") - Input.get_action_strength("move_up")

  • Nathan Lovato replied

    Hi Mateo,

    I can't help you with the information you provided above. You need to ensure that all input actions you're using are defined in your project, that you're not applying gravity to the character anymore, that it's not blocked by a collider, and much more.

    I invite you to use the debugger. In the code editor, press F9 to turn a line of code into a breakpoint. When you run the game and the compiler reaches that line, the code execution stops and you can inspect the value of all variables in the debug console. You can use that to step through your code and find why your velocity is always zero.