struct

ConstraintComponent

Module
Physics
Header
#include "Physics/Components/ConstraintComponent.h"
Namespace
Mowo
Reflection
Reflected by MowoHeaderTool

Properties

TypeNameDescription
boolenabledDefault true.
ConstraintTypetypeDefault ConstraintType::Fixed.
uint64_tconnectedEntityIdDefault 0.
boolcollideConnectedDefault true.
Vec3anchorAAnchor points relative to each body's centre of mass: A on this body, B on the connected one. Both left at zero pins the joint at the bodies' own centres; Fixed and Slider instead weld the bodies in their current relative pose, which is the useful default for those two. Angles, limits and motor targets all read as THIS body relative to the connected one (or the world), whichever of the two it is attached to. Default Vec3(0.0f, 0.0f, 0.0f).
Vec3anchorBDefault Vec3(0.0f, 0.0f, 0.0f).
Vec3axisAAxis (used by Hinge, Slider, and as the 6DOF joint's X axis), in the same space as the anchors Default Vec3(0.0f, 1.0f, 0.0f).
Vec3axisBDefault Vec3(0.0f, 1.0f, 0.0f).
floathingeLimitMinDefault -180.0f.
floathingeLimitMaxDefault 180.0f.
boolhingeLimitsEnabledDefault false.
EConstraintMotorModehingeMotorHinge motor: Position holds hingeMotorTargetAngle, Velocity spins at hingeMotorTargetVelocity. Re-applied every tick, so gameplay writing the target is live. Default EConstraintMotorMode::Off.
floathingeMotorTargetAngleDefault 0.0f.
floathingeMotorTargetVelocityDefault 0.0f.
floathingeMotorMaxTorqueDefault 100.0f.
floatdistanceMinDefault 0.0f.
floatdistanceMaxDefault 1.0f.
floatspringFrequencySpring settings (shared) Default 0.0f.
floatspringDampingDefault 0.0f.
EConstraintAxisMotionlinearMotionXSixDOF: per-axis freedom. Linear limits are symmetric half-ranges about the anchor; angular limits are a min/max pair per axis, where X is the twist about axisA and Y/Z the two swings (a pyramid, so each swing is authored on its own). Defaults reproduce a ball socket. Default EConstraintAxisMotion::Locked.
EConstraintAxisMotionlinearMotionYDefault EConstraintAxisMotion::Locked.
EConstraintAxisMotionlinearMotionZDefault EConstraintAxisMotion::Locked.
Vec3linearLimitDefault Vec3(0.5f, 0.5f, 0.5f).
EConstraintAxisMotionangularMotionXDefault EConstraintAxisMotion::Free.
EConstraintAxisMotionangularMotionYDefault EConstraintAxisMotion::Free.
EConstraintAxisMotionangularMotionZDefault EConstraintAxisMotion::Free.
Vec3angularLimitMinDefault Vec3(-45.0f, -45.0f, -45.0f).
Vec3angularLimitMaxDefault Vec3(45.0f, 45.0f, 45.0f).
EConstraintMotorModelinearMotorXSixDOF motors, one per axis. Linear targets are in the connected body's joint frame (axisB = X; the world's when unattached), angular targets in this body's (axisA = X) — with the two axes authored alike, as they usually are, the frames coincide at rest. Position targets are an offset from the anchor / an Euler orientation; Velocity targets are rates. Re-applied every tick like the hinge motor. Default EConstraintMotorMode::Off.
EConstraintMotorModelinearMotorYDefault EConstraintMotorMode::Off.
EConstraintMotorModelinearMotorZDefault EConstraintMotorMode::Off.
Vec3linearMotorTargetPositionDefault Vec3(0.0f, 0.0f, 0.0f).
Vec3linearMotorTargetVelocityDefault Vec3(0.0f, 0.0f, 0.0f).
floatlinearMotorMaxForceDefault 1000.0f.
EConstraintMotorModeangularMotorXDefault EConstraintMotorMode::Off.
EConstraintMotorModeangularMotorYDefault EConstraintMotorMode::Off.
EConstraintMotorModeangularMotorZDefault EConstraintMotorMode::Off.
Vec3angularMotorTargetRotationDefault Vec3(0.0f, 0.0f, 0.0f).
Vec3angularMotorTargetVelocityDefault Vec3(0.0f, 0.0f, 0.0f).
floatangularMotorMaxTorqueDefault 100.0f.
floatmotorFrequencyStiffness shared by every position motor, the hinge's included. For the hinge and for each 6DOF angular axis the pair describes the swing about the joint itself, however far the centre of mass sits from it. A velocity motor ignores the spring and only honours the force / torque cap. Default 2.0f.
floatmotorDampingDefault 1.0f.
floatbreakForceBreak thresholds (0 = unbreakable), compared against the solver's reaction each fixed step. Crossing either removes the joint, sets broken and raises PhysicsSystem::OnConstraintBroken plus a ConstraintBrokenEvent on the bus. Default 0.0f.
floatbreakTorqueDefault 0.0f.
floatconeHalfAngleDefault 30.0f.
Vec3pulleyFixedPointADefault Vec3(0.0f, 5.0f, 0.0f).
Vec3pulleyFixedPointBDefault Vec3(1.0f, 5.0f, 0.0f).
floatpulleyRatioDefault 1.0f.
floatpulleyMinLengthDefault 0.0f.
floatpulleyMaxLengthDefault -1.0f.
int32_tgearTeethADefault 20.
int32_tgearTeethBDefault 20.
int32_trackTeethDefault 20.
floatrackLengthDefault 2.0f.
int32_tpinionTeethDefault 20.
std::vector<Vec3>pathPoints
boolpathLoopingDefault false.
EConstraintPathRotationpathRotationDefault EConstraintPathRotation::Free.
floatpathFrictionDefault 0.0f.
EConstraintMotorModepathMotorDefault EConstraintMotorMode::Off.
floatpathMotorTargetVelocityDefault 1.0f.
floatpathMotorMaxForceDefault 1000.0f.
FPhysicsConstraintHandleconstraintRuntime state (managed by PhysicsSystem)
std::vector<FPhysicsConstraintHandle>auxConstraints
boolinitializedDefault false.
boolbrokenSet when the break threshold fired. A broken joint is NOT rebuilt on the next tick — before this flag existed the constraint re-formed one frame after snapping. Clear it to re-form the joint deliberately. Default false.
floatloadForceDefault 0.0f.
floatloadTorqueDefault 0.0f.
Generated from Physics/Components/ConstraintComponent.h via physics.json · Nov 4, 2026Version 1.0.0