# Orbit and Gravity Movement Blueprint

Hi Everyone,

Our orbit and gravity blueprint is now released on the marketplace here. If there are any support questions or feature requests ask away.

Here are a few tutorials about some of the features of the plugin:

An overview:

Sun Planet Moon setup (Planet orbiting a sun, moon orbiting a planet)Unreal Orbit Plugin - Sun Planet Moon setup - YouTube
Travel and fire projectiles through tubes:

Levitation effects:

Rolling Ball:

Current feature list:

Initial release (2 March 2016):
Physics Methods
Kinematic: Updated locations and velocity every frame based on every GravityMass component in the scene. Can be run in realtime or with a specified step time. Physics substepping supported.
Kepler: Generates a mathematically precise orbit based on a single GravityMass. Can be run realtime or a specified step time.
Blended: Uses kinematic physics for an estimated position, then kepler physics for a precise distance for that location. Slightly more efficient than kepler mode.

Functions
-Draw a spline to show the orbit (requested by ruguevara)
-Calculate the future position of the orbit based on a specified time difference
-Calculate the future position of the orbit based on time since periapsis
-Orbit distance based on a specified true anomaly or eccentric anomaly
-Orbit position based on a specified true anomaly
-Get the true anomaly at a location
-Get eccentric anomaly at a location
-Get mean anomaly at a location
-Get a true anomaly from an eccentric anomaly
-Get an eccentric anomaly from a mean anomaly
-Velocity at a orbit location
-Velocity at an orbit true anomaly
-Get the orbit normal
-Get a vector that would generate a circular orbit
-Get a vector pointing to the orbit’s ascending node

Orbit data available
-Gravity direction and magnitude
-Relative orbit velocity
-Eccentricity
-Orbit type (Elliptical, hyperbolic, parabolic)
-True anomaly
-Mean anomaly
-Eccentric Anomaly
-Inclination
-Angular Momentum
-Mean motion
-Specific Orbit Energy
-Semi Major axis
-Semi Latus ******
-Period
-Periapsis
-Apoapsis
-Time Since periapsis
-RAAN (longitude of ascending node)
-Longitude of descending node
-Argument of Periapsis

wow, great physic blueprints. May i confirm if this asset comes with all templates ?

Do you have documents with description/or use cases of the listed functions (have to confess it’s a bit hard for me to understand the list of functions & the “orbit data available” part)
Also, there’s the “rolling ball” example , I’m wondering if there is or if you have plan to implement a Cannonball Trajectory Arc/throw & bouncing ball - similar to angry birds.

If by templates you mean the “Rolling Template,” “First Person Shooter,” or “Flying” templates that the beginning of the videos start with, then Unreal Engine comes with those directly, not the plugin. You will then need to use those as starting points and follow the video tutorials, the blueprint does not come with the above tutorials already prebuilt.

For a better understanding of the orbital mechanics data, like true anomaly, eccentricity, etc. Wikipedia is probably your best bet for all that, it does a better job explaining those concepts then I could. I’ve also find this open source textbook helpful: https://books.google.com/books?id=O_7TCgAAQBAJ

Finally - you could technically use this blueprint for a cannonball trajectory/arc type functionality…but why would you? The unreal engine physics engine can do that more efficiently than a blueprint plugin. Unless you want gravity to vary as the cannonball gets further away from the ground…which is really just another way of describing an orbit

np. i was asking about the “Travel and fire projectiles through tubes:” example but i went ahead with the purchase.!

Ah, I see now. The tube template is not included, but you can use this tutorial by DokipenTechTutorials: Unreal Engine 4 Road Tool in Blueprints with Spline and SplineMesh - Part 1 Spline Components - YouTube, with the Tube staticmesh that Epic provides to recreate it.

Great blue print. Just follow the 2 min tutorial then drag / drop vola !

Just a quick question/request , in the next update, would you be able to add more description to Orbitmovement BP
for example, you have some good examples here http://prntscr.com/adunm9
but still missing a few http://prntscr.com/adunam

Also, i got some errors running the blueprints (sample map works just fine) . Where should i look into http://prntscr.com/adurmg ?

added: also, how do we speed up orbit speed / rate I have very large meshes and the small planet doesn’t look like orbiting http://prntscr.com/aduzze (although i think it does )

For the errors, it looks like you need to set the GravityMass ‘Owner’ property to the actor that you want the GravityMass to give gravity to. So, in your case, set the GravityMass owner to be your sun actor.If the Owner is blank it will throw out those errors. Ill add a check on startup to give a better formed error message.

I assume you are using the ‘Circular Orbit’ option, so if you want a planet in a circular orbit to orbit faster, you would need to give the sun more gravity. The “Standard Gravitational Parameter” option in the GravityMassActor defines the amount of gravitational force, so try increasing that. Also be sure to set the owner of the GravityMass actor to your sun.

For the 4.11 update, I will add a better error message for not having the GravityMass Owner defined, and add descriptions to the properties that are missing them.

thanks mate

To everyone, if you are looking into an orbiting physic blueprint. go get this one. For the money, you save your time/get the expert knowledge from Dingtech (yes, looks like he’s a physics expert) , not to mention the super support from him (I asked a few questions, he went ahead created a sample project for me lol)

Cheers

Would this be capable of simulating a zero gravity experience? I see it can predict orbital patterns, but would it be capable of simulating something like a jetpack controlled space walk through ship debris? Where the ship debris is sort of just floating gently, and the astronaut must fly through to reach a finish.

Hello, yes, you could turn off gravity and use the plugin to have an actor simulate zero gravity. But it would also probably be fairly easy to do that without the plugin also :). The Flying Template that comes with the engine probably would get you 70-80% of the way there.

I have been studying n-body simulation recently. Does the plug-in do some sort of n-body simulation or is it just Keplerian?

The plugin has a kinematic mode, a kepler mode, and a blend mode (kinematic velocity with kepler distances). You could use the kinematic mode for an n-body simulation.

What order is the integrator?

The plugin will only perform a ‘brute-force’ Newtonian gravity n-body algorithm, so there are no integrations or other n-body optimizations applied.

Cool, thanks for the info.

hi,
I am new at Unreal and I am tempted to get your plugin.
I would like to do a game based on a dynamic gravity system like the one you show in this video here, but I can’t find the github codes you mentionned at the beginning of the video.

Have you got a link or something?

There is more info on how you would set that up at this forum thread: Dynamic gravity for characters - Engine Source & GitHub - Unreal Engine Forums

Keep in mind that for that specific capability you will need to modify engine code, which may be difficult if you are still new to the engine.

Thanks!
Apparently the code is about to be merged to the engine by Epic during april, so maybe I’ll wait for that.

Ah, that would be great if it gets pulled into the engine. When/if it does I’ll update the plugin to support it natively.