class

FPhysicsBodyTuning

Live per-body solver tuning that RigidBodyComponent authors at creation: gravity scale, velocity caps and whether the body may sleep. Kept apart from PhysicsWorld so gameplay code that owns a body (a scripted actor, a vehicle part) can retune it without a rebuild; every call is a no-op on an invalid or removed body.

Module
Physics
Header
#include "Physics/PhysicsBodyTuning.h"
Namespace
Mowo

Public functions

ReturnsNameDescription
voidSetGravityScale
floatGetGravityScale
voidSetMaxLinearVelocityMetres per second.
floatGetMaxLinearVelocity
voidSetMaxAngularVelocityRadians per second.
floatGetMaxAngularVelocity
voidSetAllowSleepingA body that may not sleep stays in the active set and costs a solve every step; it also never reports IsBodySleeping.
boolGetAllowSleeping

Function details

SetGravityScale

C++
static void SetGravityScale(PhysicsWorld& world, FPhysicsBodyId body, float scale)

GetGravityScale

C++
static float GetGravityScale(PhysicsWorld& world, FPhysicsBodyId body)

SetMaxLinearVelocity

C++
static void SetMaxLinearVelocity(PhysicsWorld& world, FPhysicsBodyId body, float maxSpeed)

Metres per second. The solver clamps the body to this each step, which is what stops a launched prop from tunnelling a thin wall.

GetMaxLinearVelocity

C++
static float GetMaxLinearVelocity(PhysicsWorld& world, FPhysicsBodyId body)

SetMaxAngularVelocity

C++
static void SetMaxAngularVelocity(PhysicsWorld& world, FPhysicsBodyId body, float maxSpeed)

Radians per second.

GetMaxAngularVelocity

C++
static float GetMaxAngularVelocity(PhysicsWorld& world, FPhysicsBodyId body)

SetAllowSleeping

C++
static void SetAllowSleeping(PhysicsWorld& world, FPhysicsBodyId body, bool allow)

A body that may not sleep stays in the active set and costs a solve every step; it also never reports IsBodySleeping.

GetAllowSleeping

C++
static bool GetAllowSleeping(PhysicsWorld& world, FPhysicsBodyId body)
Generated from Physics/PhysicsBodyTuning.h via physics.json · Nov 4, 2026Version 1.0.0