Making a realistic planet

I want to make a realistic planet with all these factors:

  • Sphere of influence,
  • Realistic gravity(When you are higher up in the sky, the gravity is weaker),
  • Gravity controller.
    I found a free toolbox gravity controller and it works well, but there are some problems:
  • I don’t know how to make a good sphere of influence which will rotate you and your camera(Im just using the gravity controller on a part which is a size of the planet),
  • Sphere of influence has to “catch” objects when on it(Basically when i make, e.g. a car it doesn’t fall into space),
  • The size limit is really annoying, i’ve tried using a part but a 2048 stud planet is basically too big.
    Thanks for any help!
10 Likes

I don’t understand this requirement. The simulation of gravity should be sufficient to hold a car to the planet it spawns on. Is your sphere of influence just for spatial partitioning? i.e. a performance optimization because you expect to have more bodies in play than you can simulate?

3 Likes

Sorry man, but you cant ask people to write code for you. It is litterally labelled in the guidelines.

7 Likes

If 2048 studs is too big, why not just use a smaller size??? What’s the problem witth the size limit?

1 Like

When I tried to make the sphere of influence a normal part in which you are when on the planet, the jumping system was really weird, walking animation played when I was in air after a jump. So I made it an union, when you touch this union gravity enables, but if you spawn on the planet the gravity isn’t applied to HumanoidRootPart. I’m just asking if there’s any other method for that.

2 Likes

I want the planet to be as big as possible so you can actually build something on it.

2 Likes

I am not asking for entire scripts. I’m asking for ideas or some coding.

1 Like

the best response i have is:
do it yourself

1 Like

But devforum is a forum where you can get some help right? I’m just asking.

2 Likes

youre meant to have something ready to show, then ask for help regarding it.
or at the minimum dont ask for an entire game
for example:

3 Likes

Sorry, still not really understanding your sphere of influence Part/Union thing. How are you implementing gravitational forces, exactly? And why doesn’t it apply when you spawn? That doesn’t sound like a design issue, just a bug, like you’re forgetting to initialize the force or enable whatever constraint or body mover you’re using to apply the gravitational force. Either way, the force you should be applying to a character can be approximated with a simple formula you can google, you know, the F = Gm1m2/d^2 thing from physics class.

You’re out of luck if you expect an easy way to make a huge spherical surface. Even at max part size of 2048, a Ball part will have faceted render geometry that is nowhere near the resolution of its collision geometry (which is an ideal spherical surface). If you union the part, the collision geometry will be a good match, but it’s still faceted noticably, and not exactly planet sized.

Realistically, no game tries to implement huge planets as spheres at actual size, they just fake it by putting you on a locally-flat patch. It’s all smoke and mirrors.

3 Likes

I doesn’t really matter. I got answer to most of my questions I asked, now I’m just looking for an answer how to make a sphere of influence. By that I mean a region, spherical region without using parts.

Use math. Calculate the size of the sphere and the distance from the center.

3 Likes

I forgot to write anything here, im just using raycasting for now.