I am looking to create a continuous runner game around a planet and am having a hard time getting the player to continually move around the planet and adjust their direction/rotation to match when the left/right keys are input.
Anything I have is pretty useless so far so have no code to post.
Note I am quite new to Unity so apologies if this is a stupid question.
Any help is appreciated.
I guess one of below design may help you.
Design A: Runner actually doesn’t move and rotate in scene. Make the planet and background rotate reversely, so that runner seem like running forward.
Design B: Runner actually run on the planet.
Runner’s rotation always depend on vector (planet.position - runner.position)
//e.g. y-axis always match vector (planet.position - runner.position)
and for gravity
B-1: To make runner receive gravity, continuously change Physics.gravity to vector (planet.position - runner.position)
B-2: Don’t use Physics.gravity. Set all object with rigidbody not use gravity. Create trigger for planet as gravity zone, when object inside trigger (onTriggerStay), use AddForce with direction (planet.position - object .position) to simulate gravity
Wish these could help you, good luck!!