Rotate Player on Spherical World

How can I rotate my player, so

  • his feet are on the ground at anytime
  • Player gets rotated while moving

,how do I rotate my player on a spherical world, so that his feets are on the ground and he gets attracted to the ground, but without a rigidbody

Hi! You can try putting an empty game object in the center of your world which is the parent of your player. Movement would be done by rotating this empty game object in the appropriate direction.

What I would try:

  1. Set players initial position to planet surface. Lets say player.transform.position = worldPos + Vector3(0, worldRadius, 0);
  2. Then use player.transform.RotateAround(worldPos, player.transform.right, speed) to move him around
  3. I think the players feet should be on the surface the whole time now. If not use player.transform.up = player.transform.position - worldPos