![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | RohanLockley |
Hello all!
i’m currently following the first part of the tutorial in the official documentation ,to propperly learn to use godot.
I do get an error however, when using the move_and_slide call, as it expects 0 arguments instead of 5:
i figured it could have been a change in godot 4.0, but i can’t really figure out the docs it sais here that move_and_slide is a bool?
if i remove the arguments it tells me there’s an invalid getindex ‘y’ so it is defenitely my fault somewhere it doesnt work
i did manage to move in worldspace using the automaticly assigned script where move_and_slide is calles without arguments :
if direction:
velocity.x = direction.x * SPEED
velocity.z = direction.z * SPEED
else:
velocity.x = move_toward(velocity.x, 0, SPEED)
velocity.z = move_toward(velocity.z, 0, SPEED)
move_and_slide()
but that uses world coordinates. my script extends from CharacterBody3d.
The tutorial documentation you linked above is for Godot 3.2, but you mention that you’re using Godot 4. Those are likely to have lots of differences. Though, maybe you didn’t intend to link the 3.2 document?
jgodfrey | 2022-12-28 19:16