Apply Newtonian gravity to actors, simulate planet gravity, create orbits, and perform orbital mechanics calculations.
The Orbit and Gravity blueprint lets you create gravity sandboxes, place actors in orbit, and perform orbital mechanics calculations.
The plugin uses Newton’s Law of Gravity to apply a realistic gravitational force affected by distance and a gravitational size parameter. The plugin can be used to create orbiting bodies in a celestial environment (e.g. a solar system), set the orbit of a spaceship around a planet, or, for games set on the ground, create magnetism and levitation effects on actors (e.g. an anti-gravity floor or pneumatic tube).
• Three types of physics calculation modes (kinematic, Kepler, and blend)
• Elliptical, Parabolic, and Hyperbolic orbits supported
• Orbital prediction based on a future time
• 50+ orbital mechanics calculations available (e.g. inclination, true anomaly)
• Orbits can be nested, for example, a moon orbiting a planet, while a planet orbits a star.
• Automatically incorporates player input as acceleration (delta V) if actor is possessed by a player
• Physics substepping (kinematic mode)
• Configurable time scale; use as real time or with a selected timestep
• Easily create projectiles (start velocity can be specified in local space)
• Antigravity (kinematic only)
• Calculate gravity from the center of the actor (e.g. a planet) or from the StaticMesh’s closest point (e.g. e.g. applying effect to a floor or wall)
• (4.25 Update) Lagrange point calculations. Example video: https://www.youtube.com/watch?v=FlfsJ98cwUk
• “Float” variable type used for all calculations.
• Kinematic physics mode: Calculates the gravitational effect for every GravityMass actor in the scene, applies the change in velocity to each orbiting actor, and then updates the position. Kinematic can be used to incorporate gravity for multiple GravityMass actors, but the stability of the orbit is affected by how long each timestep is.
• Kepler physics mode: Generates a mathematically precise orbit based on one GravityMass. The orbit will stay consistent regardless of framerate. Numerical approximation is required so this will be more computationally intensive than other modes.
• Blend physics mode: Incorporates elements from both methods for more efficient calculations but slightly less precise than Kepler mode. Blend calculates the correct velocity and then updates the orbiting body kinematically. Maintains the correct distance from the GravityMass, but orbit timing may be less accurate than Kepler mode.
• (1) BP_OrbitMovement (an Actor Component)
• (1) BP_GravityMass Component (an Actor)
• (3) example actor blueprints (an example GravityMass, an example orbiting actor, and an example orbiting player pawn)
• (2) example maps (one showing a variety of orbit types, one that generates large number of orbiting bodies)
• (1) BP_Orbit object (stores orbit data, does calculations, and interacts with BP_OrbitMovement)
• (Over 50) orbital mechanical functions and parameters
Documentation: Comments in blueprints