+2 votes

I have an object which will be moving around in space.
I want to have identical object, but as RigidBody following the first one 1:1.

Basically, when first object moves between frames, I want to apply force to RigidBody to make it reach the same position in one frame.

I need it working as physics body because I want it to be influenced by other objects, pushing it around, slowing it down etc. and having it trying reach the destination all the time.

All my tries so far failed. RigidBody is either too slow or overshoots hard.
I tried "add_force" with different values and additional counter force in the opposite direction to stop overshooting. No success.

Is it possible to achieve using Bullet physics?

in Engine by (96 points)

1 Answer

+1 vote

Try moving it using linear_velocity

rigidbody.linear_velocity = (wanted_positon - global_transform.origin) * speed
by (3,227 points)
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.