تخطي إلى المحتوى
0 comments

الوصف

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 a strength, 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 stay surface-aligned and smooth, with no proxy jitter and no walk/fall flicker.


Preview v1.0 | | Playable Demo | Documentation | Discord Community

How to Use GravityCore
V1.4 Gravity Shooter

V1.3 Custom Gravity Physics
V1.1 Zero Gravity & Jetpack

New in V1.5: the third person shooter is multiplayer. Strafe around a planet with a rifle or pistol, aim over the shoulder, fire bullets that curve toward the ground and take off with the jetpack mid-fight, together. The server owns weapons, hits and death, and every player sees the others aim, fire, reload and fly, each in their own color. Plus thrusters whose flames and sound follow your thrust.

Drop a GravitySourceActor into your level, pick a shape, and base your character on BP_PlanetPerson (or reparent to AGravityCharacter). Add a walkable mesh and play, or open the shooter demo.

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

CORE FEATURES

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

▸ Shape-Driven Gravity Volumes - one component, a Shape dropdown: Sphere, Cylinder, or Box. Place, rotate, attach or stack as many as you like.

▸ Planet Gravity - Sphere pulls toward the center. Walk all the way around a planet 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.

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

▸ Multiplayer Third Person Shooter On Any Surface (NEW) - a ready-to-play shooter: strafe movement, over-the-shoulder aim, rifle and pistol with fire, reload and swap animations, holstering, turn-in-place, death and respawn, and the jetpack with weapons out. Server-authoritative and replicated, with a color per player, and it all works on a planet.

▸ Strafe Facing Modes - the movement component can face the movement direction, the camera (strafe), or a direction you set (lock-on). The body turns on the gravity plane, so strafing works on the far side of a planet.

▸ Gravity-Aware Player Controller - reparent to AGravityPlayerController and standard camera rigs work under custom gravity: spring arms with Pawn Control Rotation, look input and pitch limits stay relative to the ground.

▸ Projectiles And Ragdolls In Your Gravity - anything using Projectile Movement arcs toward the planet instead of world down, keeping its own gravity scale. Ragdolls get gravity on every body, so a character killed on a planet collapses onto the surface.

▸ Physics Props In Your Gravity - add one component to any physics actor and its rigid bodies fall toward the gravity field, not world down. Crates tumble around a planet, are pushed outward on a ring, and drift in zero-g.

▸ Per-Source Gravity Strength - each volume has its own gravity strength (cm/s^2), so a moon pulls lightly and a dense planet pulls hard. 980 = Earth.

▸ First-Person or Third-Person - the demo character toggles between a gravity-aligned first-person camera and the third-person orbit camera, both level to the surface with no roll.

▸ 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. Mix shapes, e.g. a flip-gravity Box room inside a Sphere planet.

▸ Per-Level Default Gravity - a placeable AGravityDefaults actor sets what is felt OUTSIDE every volume: direction and strength, or zero-gravity. No actor = world-down.

▸ Zero-Gravity Free-Fly - outside gravity the character flies in full 6DOF with an up/down thrust input, and never falls.

▸ Optional Jetpack, Replicated - a toggle lifts the character into a hover above the floor; up/down thrust rises above it. Predicted and replicated, with an On Jetpack State Changed event.

▸ Jetpack Thruster Visuals (NEW) - one component stretches the flames and pitches the thrust sound as the character climbs, hovers or descends, leaning power to one side when strafing or turning. No input wiring; works on every player.

▸ Editor & Runtime Debug - boundary gizmo, gravity arrows and an optional translucent volume mesh, each toggleable. Compiles out of Shipping.

▸ Full Blueprint Support - every gravity setting and query, facing modes, the jetpack and the shooter actions are exposed to Blueprint and C++.

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

TECHNICAL HIGHLIGHTS

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

▸ Blueprint API - every source parameter read/write, plus runtime queries for gravity direction, strength and containment at any point

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

▸ EGravityFacingMode (Movement Direction, Control Rotation, Manual) plus ToGravityRelativeRotation / ToGravityWorldRotation, so aim offsets and yaw math written for flat ground work unchanged on any surface

▸ Separate GravityShooter runtime module - character, anim instance, weapons, projectile, HUD, game mode and controller in C++, with Blueprint subclasses you can edit

▸ Server-authoritative shooter replication - weapon, health and state replicate with RepNotifies, server RPCs carry the client's crosshair target, and weapon montages play on every machine

▸ UGravityBodyComponent drives rigid bodies, ragdolls and Projectile Movement from the same field, with sleep handling so props still settle

▸ No third-party dependencies

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

INCLUDED

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

▸ Full C++ source (GravityCore + GravityShooter modules)

▸ GravitySourceActor - drop-in gravity volume (pick the shape, set the strength)

▸ AGravityDefaults - placeable per-level default gravity (direction + strength, or zero-gravity)

▸ BP_PlanetPerson - ready-to-play character with gravity movement, first/third-person camera, and jetpack

▸ Jetpack character variant + demo FX

▸ Mannequin character + Anim Blueprint (flying/floating locomotion)

▸ Enhanced Input setup for both characters

▸ Walkable ring/cylinder mesh for the ring-world demo

▸ UGravityBodyComponent + AGravityPhysicsProp - drop-in physics prop that obeys the gravity field

▸ Shooter: character, game mode and controller blueprints, rifle and pistol, bullet projectile, three Anim Blueprints, 100 animations plus montages and blend spaces, keyboard and gamepad input

▸ Shooter demo level - fight on a planet with the jetpack

▸ Physics demo level - a planet ringed with props that fall and settle all over its surface

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

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

PERFECT FOR

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

Space shooters, planetary exploration, ring worlds, sci-fi platformers, gravity-flip puzzles, and jetpack and zero-g traversal, without writing gravity-aligned movement or its replication yourself.

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

NOTES

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

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

▸ The example characters use Enhanced Input (bundled with UE5).

▸ Client shots are not predicted: firing plays once the server confirms it, one round trip later.

▸ The shooter starts unarmed: press H (D-pad down) to draw.

▸ The jetpack hover finds the floor with a downward trace on the Visibility channel.

▸ Physics props simulate per machine and can drift apart between clients.

▸ Physics gravity is applied as a force each tick: ideal for props, debris and projectiles; very fast bodies may want sub-stepping.

التنسيقات المضمنة