Circular rotation causes outward motion

Hi. I need to make a rigidbody stay on rotating platform. Here’s code I use:

void FixedUpdate()
{
platform.angularVelocity = torque;

    cube.angularVelocity = torque;
    cube.velocity = rb.GetPointVelocity(testCube.position);
}

However, cube doesn’t stay in place (Not actually this fast, gif optimized):
189040-2-4eb28becaa9e.gif

What velocity do I need to add to make it stay in place? Please don’t suggest alternative solutions like MovePosition, etc. I would like to do this using velocity if possible…

Staying on a platform in this situation is a matter of friction and “balance”, and is often simulated by parenting the character to the platform instead.

Because friction is an element, there’s not really a “force to apply” that’s automatically relevant, because the amount of force you want to apply is the remainder after the platform’s motion and friction have both been applied.


That said, there are multiple bases on which you can attempt to keep the object in place, but it depends on what the object *is*, so to speak.

In order to keep an “inanimate object” (i.e. a cube that’s not representative of a human/living creature) in place, you logically need enough friction between the cube and platform to negate any possible movement caused by the platform’s motion.

By contrast, keeping an “animate object” (such as a living being) stationary basically amounts to applying a force toward the position on the platform they’re trying to remain at (i.e. the last position they were at), since that fundamentally simulates keeping the body over the feet, as it were. This doesn’t apply force in any pre-defined direction, however; it’s inherently a relationship between the character and the specific point on the platform they’re standing on.