Help needed: weird player-relative acceleration on moving gravity point
Prodevus
Member Posts: 6
Hi there, folks
I'm making a space game with planets and moons you can jump on and walk around.
Everything seems to be working fine, apart from walking around moving moons (planets that orbit around others).
Currently, the player's gravity is constrained to the exact center of the planet/moon it's close to.
Walking around works by changing the player's RELATIVE acceleration (the player automatically rotates to the center of the planet/moon it's standing on).
However, when walking around a moon orbiting around a planet, you can only walk around the moon up until a certain point (depends on where it is in compared to the planet) - you start going slower and slower and then it just stutters until you either jump off or go the other way.
So... anyone got an idea how to fix that?
I'm making a space game with planets and moons you can jump on and walk around.
Everything seems to be working fine, apart from walking around moving moons (planets that orbit around others).
Currently, the player's gravity is constrained to the exact center of the planet/moon it's close to.
Walking around works by changing the player's RELATIVE acceleration (the player automatically rotates to the center of the planet/moon it's standing on).
However, when walking around a moon orbiting around a planet, you can only walk around the moon up until a certain point (depends on where it is in compared to the planet) - you start going slower and slower and then it just stutters until you either jump off or go the other way.
So... anyone got an idea how to fix that?
Comments
@jonmulcahy made a game called A Long Way Home. Its basically this same type of gameplay. maybe he would be able to advise you.
Maybe because the position of the moon is changing its effecting its gravity or thers a problem in collision.
A pro member will be able to help you better.
I'll go ask Jonmulcahy now, thanks for replying.