0 votes

Pretty much the title.

Here's the code:

func _physics_process(delta):
    linear_velocity.y = 0;

What should I do to cancel this ghost movement?

Godot version 3.5
in Engine by (15 points)

Have you tried using the Axis Lock property in the RigidBody inspector?

1 Answer

0 votes
Best answer

Aside of your physics process() rigid bodies runs its physics under the hood. It conflicts with your code, but gravity still pushes movement forward a little, despite freezing velocity every frame. Just set the gravity to 0

by (7,753 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.