AssetPro - GravityCore — Custom Gravity Volumes | Planet, Ring & Cuboid | Multiplayer

GravityCore is a runtime C++ plugin (with full Blueprint support) for Unreal Engine 5 that adds shape-based custom gravity — planets, ring worlds, and directional cuboid zones — that actually works in multiplayer. Define a gravity volume (Sphere, Cylinder, or Box), give it a direction, and any character inside is pulled correctly, stands on the surface, and walks, jumps and falls in that gravity. It drives the engine's built-in variable gravity, so it works with the Character Movement Component instead of fighting it.

The hard part — multiplayer — is built in. Gravity is computed deterministically from position on every machine, so other players' characters stay surface-aligned and smooth: no proxy jitter, no tilt, no walk/fall animation flicker.

Drop a GravitySourceActor into your level, pick a shape, and base your character on the included BP_GravityCharacter (or reparent to AGravityCharacter). Add your own walkable mesh and play.

Includes a ready-to-use gravity character with an independent, gravity-aligned orbit camera (full 360° look) and orient-to-movement — walk a planet, the inside of a ring, or flip gravity inside a box.


Preview Video

Playable Demo
Documentation

──────────────────────────────

CORE FEATURES

──────────────────────────────

▸ Shape-Driven Gravity Volumes — one component, a Shape dropdown: Sphere, Cylinder, or Box. Each is a self-contained SceneComponent with its own transform, so you can place, rotate, attach, or stack as many as you like.

▸ Planet Gravity — Sphere pulls toward the center. Walk all the way around a planet, moon, or asteroid.

▸ Ring-World Gravity — Cylinder pushes radially outward from its axis (centrifugal). Walk the inside of a ring or O'Neill cylinder; the axis follows the component's local Z, so orient it any way.

▸ Cuboid / Directional Gravity — Box gives uniform gravity straight down its local −Z, for rooms, corridors, or flip-gravity puzzle zones.

▸ Invert Toggle — flip any shape: Sphere repels, Cylinder pulls to the axis, Box pushes up.

▸ Priority Override Zones — nest a small high-priority volume inside a large one; where they overlap, the highest Priority wins. Stack layers and mix shapes — e.g. a flip-gravity Box room inside a Sphere planet field.

▸ Multiplayer Replicated — gravity is a deterministic function of position, computed locally on every machine, so simulated proxies align to the surface and move smoothly. No overlap-event drift, no proxy jitter, no false "falling." Floor detection stays correct on proxies, so the animation graph never flickers between walk and fall.

▸ Built On Engine Variable Gravity — sets the Character Movement Component's gravity direction, so floor detection, stepping, jumping and falling all work in any gravity direction, with full network prediction.

▸ Gravity-Aligned Character & Camera — the included AGravityCharacter has an independent, gravity-aligned orbit camera (full 360° yaw, decoupled from the character's facing) and orient-to-movement that turns the character to face its movement on any surface.

▸ Subsystem-Driven Selection — a world subsystem picks the right source per location by point-in-volume + priority. No collision or overlap setup, no triggers to wire.

▸ Editor & Runtime Debug — per-shape boundary gizmo, red gravity-direction arrows, and an optional translucent volume mesh with adjustable color — each independently toggleable. Debug draws compile out of Shipping.

▸ Logical Volumes (No Collision) — the gravity source is the field only, kept independent from geometry, so you use your own walkable meshes (samples included).

▸ Full Blueprint Support — shape, size, invert, priority, and the gravity query are all exposed to Blueprint and C++.

──────────────────────────────

TECHNICAL HIGHLIGHTS

──────────────────────────────

▸ Full Blueprint support — all source parameters Blueprint read/write; GetGravityDirectionAtLocation(), ContainsPoint(), and the subsystem's ComputeGravityDirection() callable at runtime

▸ Custom UCharacterMovementComponent that drives the engine's variable gravity — walking / jumping / falling / floor detection in any gravity direction, with network prediction

▸ Deterministic, position-based gravity computed on every machine — correct simulated proxies without replicating rotation or using overlap events

▸ Point-in-volume + priority selection (sphere / cylinder / box), per tick — replication-safe by construction

▸ Smooth gravity transitions, translation-only network smoothing, and a movement-mode mirror on proxies to prevent walk/fall flicker

▸ Independent gravity-aligned orbit camera (absolute-rotation spring arm) with full 360° look

▸ SceneComponent sources — own transform, attachable, stackable; cylinder/box axis = component local Z

▸ No third-party dependencies


──────────────────────────────

INCLUDED

──────────────────────────────

▸ Full C++ source

▸ GravitySourceActor / BP_GravitySource — drop-in gravity volume (pick the shape)

▸ BP_GravityCharacter — ready-to-play character with gravity movement and a gravity-aligned camera

▸ Mannequin character + Anim Blueprint for the demo character

▸ Enhanced Input mapping context + Move / Look / Jump actions

▸ Walkable ring/cylinder mesh (SM_Ring) for the ring-world demo

▸ Demo level with a planet, a ring world, and a flip-gravity box, pre-configured

──────────────────────────────

PERFECT FOR

──────────────────────────────

Space games, planetary exploration, ring-world / megastructure settings, sci-fi platformers, gravity-flip puzzle games, and any multiplayer or single-player project needing custom gravity directions — without writing gravity-aligned movement, surface rotation, floor detection, or the multiplayer replication math from scratch.

──────────────────────────────

NOTES

──────────────────────────────

▸ The gravity source is a logical volume with no collision — provide your own walkable meshes (samples included).

▸ The example character uses Enhanced Input (bundled with UE5).

▸ Built on the engine's built-in variable gravity / per-character gravity direction.

▸ Supports Unreal Engine 5.4.

What’s New in V1.1

Adding Zero-Gravity and Jetpacks to Custom Gravity UE5 — GravityCore V1.1

image

GravityCore V1.1 just shipped - adding zero-gravity space flight, a multiplayer-replicated jetpack, and per-level default gravity to the custom gravity plugin for Unreal Engine 5. This update expands GravityCore beyond planet/ring/box gravity volumes into space environments and hover-based movement.

Area Addition
Per-level default gravity A placeable AGravityDefaults actor sets what a character feels OUTSIDE every volume: a global gravity direction, or zero-gravity (space). In zero-g the character floats but stays upright to world Z. No actor = world-down (unchanged).
Zero-gravity free-fly Outside gravity the character switches to 6DOF flying (no floor snapping, never falls), with a dedicated Vertical (up/down) thrust input.
Optional jetpack (replicated) A toggle input lifts the character into a hover that holds a minimum height above the floor and never falls; up/down thrust rises above the minimum. Predicted + replicated, with an On Jetpack State Changed BP event that fires on every machine.
Subsystem New ShouldApplyGravity() and Blueprint setters for the per-level default.
Fix Simulated-proxy yaw jitter on a jump-in-place is gone (orient-to-movement now thresholds horizontal speed).
Engine Now supports UE 5.4 - 5.8 (added 5.8).

GravityCore V1.2 — Per-volume gravity strength and first-person camera

image

V1.2 is out on Fab. It adds two things: each gravity volume can have its own strength, and the demo character can switch to first person.

Per-source gravity strength
Every gravity volume now has its own GravityStrength in cm/s², so a moon can pull lightly and a dense planet can pull hard. 980 is Earth. Try around 162 for a moon, or 2000+ for a heavy world. The gravity outside all volumes has its own strength too, set with DefaultGravityStrength on the AGravityDefaults actor, or SetDefaultGravityStrength on the subsystem at runtime.

Under the hood, the movement component applies strength by setting the Character Movement Component’s gravity scale (strength divided by world gravity), recalculated from the character’s position every tick. Because strength depends only on position, just like gravity direction, the server, owning client and other players’ characters all agree without any extra replication. Where volumes overlap, the highest-priority volume sets both the direction and the strength.

Everything defaults to 980, so existing projects behave exactly the same until you change a value.

First-person / third-person toggle
The demo character can now switch between the third-person orbit camera and a first-person camera. The first-person camera sits at eye height (FirstPersonEyeHeight) and uses the same gravity-aligned look as the orbit camera, so it stays level to the surface on a planet or ring with no roll. First person has a wider pitch range (FirstPersonPitchMin/Max, default -80 to 80), and the player’s own mesh is hidden while other players still see it.

The view choice is local to each client and not replicated, so every player picks their own.

Toggle it with Toggle First Person or Set First Person from Blueprint, bind the First-Person input action, or tick bFirstPerson to start in first person. Movement needs no changes because it already follows the camera heading in both modes.

Gravity is independent of the camera, so you can build any first-person setup on your own character too. The key is to handle look in the gravity frame, turning around the capsule’s up and pitching around its right, instead of using world-Z control rotation.

Blueprint additions

  • GetGravityStrengthAt and SetDefaultGravityStrength on the gravity subsystem
  • Set First Person, Toggle First Person and Is First Person on the character, plus a First-Person input action

All V1.1 features, including per-level default gravity, zero-g free-fly and the replicated jetpack, are unchanged. Supports UE 5.4 through 5.8, full C++ source with a Blueprint API.

Fab: GravityCore - Custom Gravity Volumes | Planet, Ring & Cuboid | Multiplayer | UE5 | Fab

Happy to answer questions about gravity strength or the first-person setup here.

GravityCore V1.3 — Physics props that follow custom gravity
image

V1.3 is out on Fab. This update brings custom gravity to physics objects.

Characters already followed GravityCore’s gravity through the movement component. Rigid bodies are a separate system, though. Unreal applies physics gravity along one world axis only, so a crate dropped on a planet would fall off into space. V1.3 fixes that.

Gravity Body component
Add UGravityBodyComponent to any actor with a physics mesh, and its rigid bodies fall toward whichever gravity volume they’re in. Crates settle on the far side of a planet, get pushed outward inside a ring world, and drift when they’re outside every volume in zero-g. If the mesh isn’t simulating yet, the component switches it to Movable and turns physics on for you. You can disable that with bAutoEnableSimulation.

How it works
The component turns off the engine’s own gravity on the bodies it controls, so the two never add up. Each tick, it reads the gravity field at each body’s location and applies it with AddForce using bAccelChange, in the pre-physics tick group. Because it’s an acceleration rather than a force, it doesn’t depend on mass: a heavy crate and a light one fall at the same rate. Sleeping bodies are skipped, since their contacts hold them in place.

Settling
Gravity applied as an external force keeps resting contacts slightly more jittery than built-in gravity does, so two properties compensate: SleepThresholdMultiplier (default 4) and AngularDamping (default 0.5). If the gravity source itself moves, like a ship or a moving platform, enable bKeepAwake so resting props aren’t left behind.

Blueprint gravity queries
ComputeGravityDirection, GetGravityStrengthAt and ShouldApplyGravity on UGravitySubsystem are now Blueprint-callable. Other plugins can also reach them through reflection.

Included
AGravityPhysicsProp, a ready-made physics prop, and a demo level with props falling and settling around a planet.

Limitations worth knowing

  • Physics props aren’t replicated. The gravity field is the same on every machine, but rigid-body simulation isn’t, so props can drift apart between clients. If their exact position matters in multiplayer, replicate them yourself.
  • Gravity is applied once per tick, not per physics sub-step, because Unreal has no per-body gravity direction. That’s fine for props and debris. Very fast objects would need a sub-step callback.

Supports UE 5.4 through 5.8, full C++ source with a Blueprint API.

Fab: GravityCore - Custom Gravity Volumes | Planet, Ring & Cuboid | Multiplayer | UE5 | Fab

GravityCore V1.4 — Third person shooter, facing modes, projectile and ragdoll gravity

Gravitycore 1.4 gravity shooter

V1.4 is out on Fab. The headline is a complete third person shooter built on GravityCore, but most of the work went into making standard shooter setups behave under custom gravity, and those pieces are useful on their own.

Third person shooter (new GravityShooter module)
A strafing shooter character with over-the-shoulder aim, rifle and pistol, reload, weapon swap, holstering, walk and jog, turn-in-place, ragdoll death and respawn. It runs on UGravityMovementComponent, so it all works on the side or underside of a planet, inside a ring world, or in a rotated Box volume on a wall or ceiling. Keyboard and gamepad. Open /GravityCore/Shooter/Maps/GravityShooterDemo and press Play.

The shooter is single-player in V1.4: the character, weapons and projectiles don’t replicate yet. Multiplayer is implemented and coming in the next update. GravityCore’s gravity, the demo character and its jetpack are already multiplayer as before.

Facing modes
UGravityMovementComponent has a new FacingMode: MovementDirection (the default, unchanged), ControlRotation for strafing, where the body tracks the aim and moves any direction, or Manual via SetDesiredFacingDirection for lock-on targets, cutscenes or AI. Facing happens on the gravity plane, so a strafing character stays correct on the far side of a planet. FacingRotationRate limits the turn speed, and 0 snaps. Under custom gravity, use FacingMode instead of bUseControllerRotationYaw or bOrientRotationToMovement, since both work in world yaw and fight the gravity alignment.

Gravity-relative rotation helpers
ToGravityRelativeRotation, ToGravityWorldRotation and GetGravityUp convert rotations into and out of the character’s gravity frame. Convert the rotations involved, and flat-ground math like aim offset pitch or a turn-in-place yaw delta works unchanged on any surface. The shooter’s anim instance uses them for exactly that.

AGravityPlayerController
Reparent your player controller to it and standard camera rigs work under custom gravity: a spring arm with Use Pawn Control Rotation, AddControllerYawInput and AddControllerPitchInput, and the camera manager’s pitch limits all stay relative to the ground. With bFollowGravityChanges on, which is the default, the view is carried along as gravity turns, so walking around a planet keeps the camera pointed at the same place relative to the ground. AGravityCharacter doesn’t need it, since its camera is already gravity-aligned.

Projectiles follow the field
UGravityBodyComponent now takes over Projectile Movement components via bAffectProjectileMovement, on by default. Each projectile’s own ProjectileGravityScale is kept as a multiplier and set to 0, and the field is added to its velocity each tick instead. A bullet at 0.5 still drops far less than a grenade at 1.0, but both drop toward the planet.

Ragdolls follow the field
Simulating skeletal meshes get gravity on every body, not just the root, and keep their Physics Asset’s per-body settings. The shooter character adds a Gravity Body component when it dies, if you want a working example.

Everything from V1.3 and earlier works as before. FacingMode defaults to MovementDirection, and bAffectProjectileMovement only acts on actors with a Projectile Movement component, so existing characters and props are unchanged. Supports UE 5.4 through 5.8, full C++ source with a Blueprint API.

Fab: GravityCore - Custom Gravity Volumes | Planet, Ring & Cuboid | Multiplayer | UE5 | Fab

Happy to answer questions about the facing modes or the controller setup here.