I am currently trying to create a physics game. Newtonian gravity is in effect, I am rotating planets with addTorque, everything is set up based upon realistic physics models. I am trying to, given the distance between the planet and the player (i have this) and the angular velocity of the planet (I also have this), find the tangential velocity of the player, so they can stay grounded on the rotating planet.
I essentially need to apply some sort of acceleration, I just don’t know where to get this acceleration.
What equation should I be using? Are there any useful functions for this purpose? I have looked into the docs, but I do not know where to start.
Thank you, and If code is needed, I will post it, though I do not believe it should be needed.
P.S. I am using a vector3 to define the rotational direction of the planet, addTorque then uses this to rotate it.
_
For a planet that’s rotating at angular speed A [rad/s], a stationary point on it’s surface will travel a distance in one second:
dist = A * r
Thus… giving you the linear speed value.
Note: r doesn’t mean distance to planet center here but distance to rotation axis (so at the poles r is zero).
_
To convert this linear speed into a 3d vector you must know rotation direction vector. It can be calculated, for example, as:
direction_vector = Vector3.Cross( planet_rotation_axis.normalized , (point - planet_center).normalized )
tangential_velocity = direction_vector * dist
where planet_rotation_axis is angular momentum vector for left-handed coordinate system.
I make this point because UnityEngine.Vector3.Cross is “left-handed” where most physics books prefere “right-handed” convention. To convert between right-handed and left-handed vectors you just flip them by negating this vector -vec.