Flying around a planet question.

I’m currently looking for a way to use my physics thruster driven BP pawn (AKA Spaceship) around a planet. Or basically a large sphere. I’m also trying to figure out a way to implement asteroids and other objects to be on the same cylindrical plane so to speak without using gravity to suck me straight to the sphere. What would be the best way to achieve this? You can see here in this video exactly what I’m trying to achieve.

Would this be accomplished using physical constraints? Would that affect my spacecraft? I’m unfortunately at a bit of a stand still here. I would greatly appreciate any help on this, as I’m still well into my learning curve with unreal. :slight_smile: Thanks!

I searched and came up with a few point gravity tips, physical constraints, and other things, but I just can’t seem to get my ship to succesfully hover on top of a planet. or any other objects.

EDIT: I did some more searching and it would seem the only way to do this currently with unreal is C++. Rewriting the SC… Is this true? Planetary gravity doesn’t seem to be a thing unreal is currently capable. Unless I’m missing something…

Well it may depend on how much of it you want to actually be physics. Because I can almost assure you they didn’t use physics to get that distance, it’s constrained and there is no gravity affecting it at all.

BUT just trying to think of a way off of the top of my head, i can up with this…

Attach your ship to a Spring Arm component, like you would a camera. and put the ship where the camera would normally go. When you set it up in the level, make the start point/center of the ship(springarm) blueprint in the center of the planet, then adjust the arm length to get the height you want above the planet.

For your controls, instead of directly controlling the ship directly, you actually control the rotation of the spring arm. Since your ship is attached it will look like it’s floating above the planet and will always keep the same distance!

I’d probably Make a parent class first that contains the spring arm and other basic stats you need to anything else that would be above the planet in a similar fashion. :slight_smile:

Teach me the ways!! haha.

I have no clue. I did some playing around with the spring arm component like had mentioned. But then wouldn’t I have to do that for every single asteroid I’d like to shoot? What about when I blow it up and debris goes flying all over? There’s got to be a way that this can be done in Unreal without having to actually rewrite the SC.

This https://forums.unrealengine.com/showthread.php?57376-Dynamic-gravity-for-characters&highlight=gravity is the VERY best thing I found… But then, even IF i did this, I still need to figure a way to stay above the planet at a certain height as well with all of the things I want to destroy. :frowning: Definitely stumped. ha. I’m sure its something easy and someone somewhere is probably laughing at me lol.