Player Jumping with Radial Gravity

Right now I’m working on a small platform game in which the player is a sphere rolling around the surfaces of moons. To make the player jump, I’m currently calling:

player.touchJoint.frequency = 0.3;

player:setLinearVelocity(250*math.cos(player.angle - math.pi/5), 250*math.sin(player.angle - math.pi/5));

This works as intended on the first moon, however, since the radii of the moons are not all the same, the radial gravities are not all the same, so on the larger moons the player makes smaller jumps and on the smaller moons the player makes larger jumps.

I’m not sure how to create a sense of standardized gravity while maintaining the effect of the center-seeking forces acting on the player.

What kind of formula can I apply to the frequency to make this happen? I’ve done some trial and error but my results aren’t very good and I can’t find a consistent formula to attach to the frequency to make it appear that the gravity acting on the player is the same no matter what the radius of the field acting on them is.

Thanks in advance!

EDIT: If it helps, here’s an image of a level used in the game.

dlloQ2e.png

on the larger moons the player makes smaller jumps and on the smaller moons the player makes larger jumps.

I know this answer isn’t necessarily going to be the most helpful of answers but that’s sort of how it would work? i.e. the bigger the moon the stronger the force of gravity?

However naturally that isn’t helpful if you want a standardised gravity force. Sadly I don’t have time right now to make a little test however that magic number of 250, could you have that number affected by the radius of whatever moon the player is currently on?

[quote name=“Glitch Games” post=“370461” timestamp=“1510575775”]I know this answer isn’t necessarily going to be the most helpful of answers but that’s sort of how it would work? i.e. the bigger the moon the stronger the force of gravity?   However naturally that isn’t helpful if you want a standardised gravity force. Sadly I don’t have time right now to make a little test however that magic number of 250, could you have that number affected by the radius of whatever moon the player is currently on?[/quote] Thanks. I have been trying to work with the radius of the moon itself as well as I assumed it also involved the distance from the touch joint/center of the moon. My best attempt is currently: player.touchJoint.frequency = 3/math.sqrt(self.moonRadius); This works significantly better but still not well enough. Should I apply something to the setLinearVelocity() call as well?

on the larger moons the player makes smaller jumps and on the smaller moons the player makes larger jumps.

I know this answer isn’t necessarily going to be the most helpful of answers but that’s sort of how it would work? i.e. the bigger the moon the stronger the force of gravity?

However naturally that isn’t helpful if you want a standardised gravity force. Sadly I don’t have time right now to make a little test however that magic number of 250, could you have that number affected by the radius of whatever moon the player is currently on?

[quote name=“Glitch Games” post=“370461” timestamp=“1510575775”]I know this answer isn’t necessarily going to be the most helpful of answers but that’s sort of how it would work? i.e. the bigger the moon the stronger the force of gravity?   However naturally that isn’t helpful if you want a standardised gravity force. Sadly I don’t have time right now to make a little test however that magic number of 250, could you have that number affected by the radius of whatever moon the player is currently on?[/quote] Thanks. I have been trying to work with the radius of the moon itself as well as I assumed it also involved the distance from the touch joint/center of the moon. My best attempt is currently: player.touchJoint.frequency = 3/math.sqrt(self.moonRadius); This works significantly better but still not well enough. Should I apply something to the setLinearVelocity() call as well?