Make RigidBody follow object precisely

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By blockchan

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?

:bust_in_silhouette: Reply From: Magso

Try moving it using linear_velocity

rigidbody.linear_velocity = (wanted_positon - global_transform.origin) * speed