0 votes

the rigid body rotates when I moving it on a surface using addcentralforce(). however, according to my knowledge of physics, it should not rotate. the document also says addcentralforce() adds a constant directional force without affecting rotation.
more detailed information can be found in the code and pictures below:

func _physics_process(_delta):
  if Input.is_action_pressed("ui_right"):
    add_central_force(Vector2(16, 0))

enter image description here
enter image description here

Godot version v3.2.3.stable on linux
in Engine by (18 points)

1 Answer

0 votes
Best answer

Because the box and the gound have friction.

by (1,448 points)
edited 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 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 webmaster@godotengine.org with your username.