跳转到内容

物理组件

下面每个字段都由引擎自身的组件注册表推导而来——就是编辑器 Details 面板读的那一份—— 所以这里的类型和默认值就是你添加组件时真正拿到的值,且不可能与代码脱节。讲怎么用的正文在 每条目所链接的指南里。字段说明取自 C++ ES_PROPERTY 处的原文,因此为英文。

BoxCollider2D

A rectangular collision shape. Sizes are in **metres**, not pixels.

Explained in gameplay/physics.

FieldTypeDefaultNotes
halfExtentsVec2(0.5, 0.5)
offsetVec2(0, 0)
radiusnumber0.05
densitynumber1
frictionnumber0.3
restitutionnumber0
isSensorbooleanfalse
enabledbooleantrue
categoryBitsnumber1
maskBitsnumber65535

BoxCollider3D

A box collision shape in 3D. Half-extents are in world units.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
halfExtentsVec3(50, 50, 50)
centerVec3(0, 0, 0)
frictionnumber0.3 Range ≥ 0.
restitutionnumber0 Range 0–1.
isSensorbooleanfalse
enabledbooleantrue

Breakable

A thing that breaks: drawn whole until `broken` is raised, then its pieces, cut beforehand, are put where it stood and thrown out from where it was struck.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
piecesAsset<prefab>noneThe prefab of its pieces: a model with a fracture step writes one beside its mesh.
brokenbooleanfalseRaise to break it, lower to make it whole again.
burstnumber300How fast the pieces leave, in world units a second, out from Origin. 0 lets them fall where they are. Range ≥ 0, step 10.
originVec3(0, 0, 0)Where it is struck, from its own origin: the pieces fly away from here.
lifetimenumber0Seconds the pieces last before they are taken away. 0 keeps them. Range ≥ 0, step 0.5.
breakImpulsenumber0A hit at least this hard breaks it: speed times mass, kg by world units a second (1 kg at 10 m/s is 1000 at 100 units to the metre). It needs a collider to be hit. 0 breaks it only when Broken is raised. Range ≥ 0, step 50.
enabledbooleantrue

CapsuleCollider2D

A capsule collision shape — the usual choice for a character body.

Explained in gameplay/physics.

FieldTypeDefaultNotes
radiusnumber0.25
halfHeightnumber0.5
offsetVec2(0, 0)
densitynumber1
frictionnumber0.3
restitutionnumber0
isSensorbooleanfalse
enabledbooleantrue
categoryBitsnumber1
maskBitsnumber65535

CapsuleCollider3D

An upright capsule — what a 3D character is. Total height is 2*(halfHeight + radius).

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
radiusnumber30 Range ≥ 0.
halfHeightnumber50 Range ≥ 0.
centerVec3(0, 0, 0)
frictionnumber0.3 Range ≥ 0.
restitutionnumber0 Range 0–1.
isSensorbooleanfalse
enabledbooleantrue

ChainCollider2D

A polyline of edges — open or looped — for static terrain.

Explained in gameplay/physics.

FieldTypeDefaultNotes
pointsVec2[][{"x":-1,"y":0},{"x":0,"y":0.5},{"x":1,"y":0},{"x":0,"y":-0.5}]
isLoopbooleantrue
frictionnumber0.6
restitutionnumber0
categoryBitsnumber1
maskBitsnumber65535
enabledbooleantrue

CharacterController2D

Kinematic character movement that slides along walls, climbs slopes and reports ground contact.

Explained in gameplay/physics.

FieldTypeDefaultNotes
velocityVec2(0, 0)
upVec2(0, 1)
floorMaxAnglenumber0.7854Max walkable slope from up (radians) Range 0–1.5708, step 0.01.
maxSlidesnumber4 Range 1–8, step 1.
skinWidthnumber1 Range ≥ 0, step 0.25.
snapLengthnumber0Floor-snap probe length; 0 disables stair/slope stick Range ≥ 0, step 0.5.
slideOnCeilingbooleantrue
maskBitsnumber65535
stepHeightnumber0The highest ledge it walks up without jumping; 0 = only what its rounded foot rides over Range ≥ 0, step 1.
stopOnSlopebooleantrueStand still on a walkable slope, and walk it without gravity slowing or speeding it
constantSlopeSpeedbooleanfalseKeep the speed asked for along a slope, rather than the speed across the ground
blockSteepSlopesbooleantrueA slope past the walkable angle is a wall to walk into. Off, it walks straight up
followPlatformbooleantrueMove with what it stands on
dynamicBodiesenumBlockHow it meets dynamic bodies One of Block, Push, Ignore.
pushForcenumber40The most force it pushes with Range ≥ 0.
dropThroughbooleanfalsePass through one-way platforms while on
isOnFloorbooleanfalse
isOnWallbooleanfalse
isOnCeilingbooleanfalse
floorNormalVec2(0, 0)
realVelocityVec2(0, 0)
floorEntityEntitynone
floorVelocityVec2(0, 0)

CharacterController3D

A kinematic 3D mover: swept against the world, climbs steps, stays glued to slopes, and reports the ground it is on.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
velocityVec3(0, 0, 0)
radiusnumber30 Range ≥ 0.
halfHeightnumber50 Range ≥ 0.
maxSlopenumber0.87Steepest ground it can stand on Range 0–1.5708, step 0.01.
layernumber0 Range 0–15, step 1.
stepHeightnumber40 Range ≥ 0, step 0.05.
snapDownnumber50 Range ≥ 0, step 0.05.
massnumber70 Range ≥ 0.
pushForcenumber5000How hard it can shove what it walks into Range ≥ 0.
enabledbooleantrue
isOnFloorbooleanfalse
floorNormalVec3(0, 0, 0)
realVelocityVec3(0, 0, 0)

CircleCollider2D

A circular collision shape. Radius is in **metres**.

Explained in gameplay/physics.

FieldTypeDefaultNotes
radiusnumber0.5
offsetVec2(0, 0)
densitynumber1
frictionnumber0.3
restitutionnumber0
isSensorbooleanfalse
enabledbooleantrue
categoryBitsnumber1
maskBitsnumber65535

CompoundCollider3D

Boxes, spheres and capsules with local positions and rotations, combined into one native rigid body using the model placement scale.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
partsarrayempty
frictionnumber0.3
restitutionnumber0
isSensorbooleanfalse
massnumber1
enabledbooleantrue

ConvexCollider3D

Collides against the convex hull of an imported mesh — the shape a solver can push, unlike a mesh collider.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
meshAsset<mesh>noneGeometry (.esmesh) whose convex hull collides.
frictionnumber0.3 Range ≥ 0.
restitutionnumber0 Range 0–1.
isSensorbooleanfalse
enabledbooleantrue

DistanceJoint2D

Holds two bodies a fixed (or spring-limited) distance apart.

Explained in gameplay/physics.

FieldTypeDefaultNotes
connectedEntityEntity-1
anchorAVec2(0, 0)Where the joint attaches on the connected body, in that body's frame (pixels).
anchorBVec2(0, 0)Where it attaches on this entity, in its own frame (pixels).
lengthnumber1
enableSpringbooleanfalse
hertznumber1
dampingRationumber0.5
enableLimitbooleanfalse
minLengthnumber0.5
maxLengthnumber2
enableMotorbooleanfalse
maxMotorForcenumber0
motorSpeednumber0
collideConnectedbooleanfalse
enabledbooleantrue

DistanceJoint3D

Keeps two 3D bodies a distance apart: a rope, a rod, or a spring when a frequency is given.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
connectedEntityEntity-1
anchorVec3(0, 0, 0)
connectedAnchorVec3(0, 0, 0)
minLengthnumber0
maxLengthnumber100
frequencynumber0
dampingnumber0.5
collideConnectedbooleanfalse
enabledbooleantrue
breakForcenumber0
breakTorquenumber0

FirstPersonController

Looks, walks, jumps and crouches in a CharacterController3D from the keyboard, the pointer and the touch screen, through a camera on a child.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
moveSpeednumber320 Range ≥ 0.
sprintMultipliernumber1.6 Range ≥ 1, step 0.05.
crouchMultipliernumber0.5 Range 0–1, step 0.05.
accelerationnumber2400 Range ≥ 0.
decelerationnumber3200 Range ≥ 0.
airControlnumber0.3 Range 0–1, step 0.05.
jumpSpeednumber420Upward speed a jump starts with. 0 = cannot jump. Range ≥ 0.
gravityScalenumber1The player's gravity as a share of the world's. Above 1 falls faster and jumps feel snappier. Range ≥ 0, step 0.05.
coyoteTimenumber0.1How long after walking off an edge a jump still works. Range ≥ 0, step 0.01.
jumpBuffernumber0.12How long a jump pressed just before landing is kept. Range ≥ 0, step 0.01.
lookSensitivitynumber0.12 Range ≥ 0, step 0.01.
touchSensitivitynumber0.2 Range ≥ 0, step 0.01.
pitchMinnumber-85 Range -90–0.
pitchMaxnumber85 Range 0–90.
eyeHeightnumber70Where the eye is above the character's centre when standing.
crouchEyeHeightnumber28
crouchHalfHeightnumber45The capsule's half height when crouched. The standing one is the character controller's own. Range ≥ 1.
eyeSpeednumber400 Range ≥ 0.
cameraEntitynoneThe camera that looks, under this entity. Empty is the first child that carries one.
pointerLockbooleantrueTake the pointer for looking once the player clicks, instead of looking while a button is held.
touchLookbooleantrueLook by dragging a finger on the right of the screen.
touchLookFromnumber480How far across the screen, in pixels, a finger must start to look. The left is left for a stick. Range ≥ 0.
enabledbooleantrue
yawnumber0
pitchnumber0
crouchingbooleanfalse Read-only — the engine computes it.
standHalfHeightnumber0 Read-only — the engine computes it.
eyenumber-1 Read-only — the engine computes it.
rebuildnumber0 Read-only — the engine computes it.
airTimenumber0 Read-only — the engine computes it.
jumpHeldnumber0 Read-only — the engine computes it.
jumpedbooleanfalse Read-only — the engine computes it.

FirstPersonViewModel

On the player's camera: draws what is held with a second camera over the world's, with its own field of view and near plane, so it does not go through walls.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
layernumber20The sorting layer the held thing is on: put it on its renderers, under this camera. Range 0–31.
fovnumber60The held thing's own field of view, so it does not stretch with a wide view of the world. Range 1–170.
nearPlanenumber1How close it may come before it is cut, so it can be held against a wall without going through it. Range ≥ 0.01.
farPlanenumber1000 Range ≥ 1.

FixedJoint2D

Locks two bodies rigidly together, with optional spring give.

Explained in gameplay/physics.

FieldTypeDefaultNotes
connectedEntityEntity-1
anchorAVec2(0, 0)Where the joint attaches on the connected body, in that body's frame (pixels).
anchorBVec2(0, 0)Where it attaches on this entity, in its own frame (pixels).
linearHertznumber0
angularHertznumber0
linearDampingRationumber1
angularDampingRationumber1
collideConnectedbooleanfalse
enabledbooleantrue

FixedJoint3D

Locks two 3D bodies together in the pose they were placed in — no freedom at all.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
connectedEntityEntity-1
collideConnectedbooleanfalse
enabledbooleantrue
breakForcenumber0
breakTorquenumber0

FoliageContact

Something plants feel: grass parts around it, shrubs lean away, and placed plants near it become entities with colliders.

Explained in graphics/foliage.

FieldTypeDefaultNotes
radiusnumber40How far from this entity plants lean away. Range ≥ 0.01.
strengthnumber1How hard they lean: 1 is a full lean, 0 none. Range 0–2, step 0.01.
recoverynumber0.6How long grass takes to stand up again behind it. Range ≥ 0, step 0.05.
enabledbooleantrue

Health

What something has left, and what makes it damageable at all — written only by the system that answers the Damage bus.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
currentnumber100 Range ≥ 0.
maxnumber100 Range ≥ 0.

HingeJoint2D

Pins two bodies at a point and lets them rotate — a hinge, with optional limits and a motor.

Explained in gameplay/physics.

FieldTypeDefaultNotes
connectedEntityEntity-1
anchorAVec2(0, 0)Where the joint attaches on the connected body, in that body's frame (pixels).
anchorBVec2(0, 0)Where it attaches on this entity, in its own frame (pixels).
enableMotorbooleanfalse
motorSpeednumber0
maxMotorTorquenumber0
enableLimitbooleanfalse
lowerAnglenumber0
upperAnglenumber0
collideConnectedbooleanfalse
enabledbooleantrue

HingeJoint3D

One axis of rotation between two 3D bodies — a door or a driven wheel, with optional limits and a motor.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
connectedEntityEntity-1
anchorVec3(0, 0, 0)Where the joint attaches, in THIS entity's frame (world units).
axisVec3(0, 1, 0)
enableLimitbooleanfalse
lowerAnglenumber-1.5708
upperAnglenumber1.5708
enableMotorbooleanfalse
motorSpeednumber0
maxMotorTorquenumber0
collideConnectedbooleanfalse
enabledbooleantrue
breakForcenumber0
breakTorquenumber0
anglenumber0

Hitboxes

A box on each bone of a skinned character that follows the animation: a kinematic sensor a ray meets and names, so a shot can tell a head from a boot.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
skinEntitynone
thicknessnumber0.25A box's thickness as a fraction of its bone's length. Range 0.01–2.
minBoneLengthnumber5A bone shorter than this gets no box of its own, in world units. Range ≥ 0.
layernumber0The collision layer the boxes are in, for a shot to ask for. Range 0–15, step 1.
enabledbooleantrue

Hunter

A character that hunts what it perceives: it asks navigation for a route, the character controller for the movement, and the animator for a swing — the concrete twin of ThirdPersonController.

Explained in gameplay/ai/overview.

FieldTypeDefaultNotes
attackRangenumber110How close it gets before it swings. Range ≥ 0.
attackIntervalnumber1.6 Range ≥ 0.
rotationSpeednumber540 Range ≥ 0.
idleThresholdnumber8 Range ≥ 0, step 0.05.
enabledbooleantrue
statestring"idle" Read-only — the engine computes it.
cooldownnumber0 Read-only — the engine computes it.

MeleeAttack

A swing whose timing is the animation’s and whose reach is the physics world’s: a `hit` beat asks what is around an animated anchor, and gameplay decides who may be hurt.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
radiusnumber60 Range ≥ 0.
damagenumber25 Range ≥ 0.
layersnumber0 Range 0–15, step 1.
anchorEntitynoneThe animated socket the swing reaches from.
enabledbooleantrue
attackIdnumber0 Read-only — the engine computes it.
hitCountnumber0 Read-only — the engine computes it.

MeshCollider3D

Collides against an imported mesh’s own triangles — terrain, stairs, a room. Always static, and one-sided.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
meshAsset<mesh>noneGeometry (.esmesh) to collide against.
layernumber0 Range 0–15.
frictionnumber0.3 Range ≥ 0.
restitutionnumber0 Range 0–1.
enabledbooleantrue

MotorJoint2D

Drives one body toward a target offset and angle — moving platforms and conveyors.

Explained in gameplay/physics.

FieldTypeDefaultNotes
connectedEntityEntity-1
linearVelocityVec2(0, 0)
maxVelocityForcenumber0
angularVelocitynumber0
maxVelocityTorquenumber0
linearHertznumber0
linearDampingRationumber0
maxSpringForcenumber0
angularHertznumber0
angularDampingRationumber0
maxSpringTorquenumber0
collideConnectedbooleanfalse
enabledbooleantrue

OneWayPlatform2D

Makes a collider solid from one side only, so a body passes up through it and lands on top.

Explained in gameplay/physics.

FieldTypeDefaultNotes
normalVec2(0, 1)
localSpacebooleanfalse
enabledbooleantrue

PlantProxy

The entity standing in for a placed plant while something is near it, which a ray or a collision finds.

Explained in graphics/foliage.

FieldTypeDefaultNotes
sourcestringempty
keystringempty

PlatformerController2D

Runs and jumps a CharacterController2D from the keyboard or a game, with coyote time, a jump buffer and dropping through one-way platforms.

Explained in gameplay/physics.

FieldTypeDefaultNotes
moveSpeednumber260 Range ≥ 0.
groundAccelerationnumber2400 Range ≥ 0.
airAccelerationnumber1500 Range ≥ 0.
groundDecelerationnumber3000 Range ≥ 0.
airDecelerationnumber900 Range ≥ 0.
gravitynumber1600 Range ≥ 0.
fallGravityScalenumber1.25Gravity multiplier while falling. Above 1 lands faster than it rose. Range ≥ 0, step 0.05.
maxFallSpeednumber1000 Range ≥ 0.
jumpSpeednumber620Upward speed a jump starts with. 0 = cannot jump. Range ≥ 0.
jumpCutnumber0.5How much of a rising speed survives letting go of jump. 1 makes every jump full height. Range 0–1, step 0.05.
coyoteTimenumber0.1After leaving the ground, how long a jump still counts as from the ground. Range ≥ 0, step 0.01.
jumpBuffernumber0.12How long a jump pressed too early is remembered, to happen on landing. Range ≥ 0, step 0.01.
airJumpsnumber0Extra jumps before landing again. Range ≥ 0, step 1.
dropTimenumber0.2How long a drop through a one-way platform lasts. Range ≥ 0, step 0.01.
keepPlatformVelocitybooleantrue
readKeyboardbooleantrueMove with A/D or the arrows, jump with Space, W or Up, drop with Down or S and jump. Off, a game writes the inputs itself.
moveInputnumber0 Range -1–1, step 0.1.
jumpHeldbooleanfalse
jumpPressedbooleanfalse
dropPressedbooleanfalse
enabledbooleantrue

PointJoint3D

Holds two 3D bodies at a shared point, free to turn on all three axes — a chain link, a ragdoll limb.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
connectedEntityEntity-1
anchorVec3(0, 0, 0)Where the joint attaches, in THIS entity's frame (world units).
collideConnectedbooleanfalse
enabledbooleantrue
breakForcenumber0
breakTorquenumber0

PolygonCollider2D

A convex polygon collision shape from your own points.

Explained in gameplay/physics.

FieldTypeDefaultNotes
verticesVec2[][{"x":-0.5,"y":-0.5},{"x":0.5,"y":-0.5},{"x":0.5,"y":0.5},{"x":-0.5,"y":0.5}]
radiusnumber0
densitynumber1
frictionnumber0.3
restitutionnumber0
isSensorbooleanfalse
enabledbooleantrue
categoryBitsnumber1
maskBitsnumber65535

Ragdoll

Turns a skinned character's bones into jointed bodies while active, with limits by part of the body and one-way knees and elbows, and blends back to the animation when it is switched off.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
activebooleanfalseWhether the character is limp. Turn it on when it is knocked down, off to stand it up.
skinEntitynoneThe entity that holds the skinned mesh, whose joints are the skeleton. Empty looks on this entity and then below it.
profileenumHumanoidUniform gives every joint the same limits. Humanoid gives each the share of them its part of a body has, read from the bone's name: a spine stiff, a shoulder loose, a shin almost a hinge. One of Uniform, Humanoid.
swingnumber100How far a limb may swing from its bone's line, in degrees. With the humanoid profile, the most a loose joint (a shoulder, a hip) is given. Range 0–175.
twistnumber60How far a limb may twist about its own line, in degrees. With the humanoid profile, the most a loose joint is given. Range 0–175.
bendnumber130How far a knee or an elbow may bend, in degrees, and only one way: a shin folds back, a forearm folds forward. 0 leaves them swinging like any other joint. Humanoid profile only. Range 0–175.
facingenum+ZWhich of its own axes the character looks along. It is what tells a knee from a hyperextended one. One of +Z, -Z, +X, -X.
thicknessnumber0.25A limb's thickness as a fraction of its length. Range 0.01–2.
minBoneLengthnumber0.05A bone shorter than this gets no body of its own (a finger, a toe): its parent carries it. Range ≥ 0.
frictionnumber0.5 Range ≥ 0.
recoverTimenumber0.4Seconds to blend from the limp pose back to the animation once the ragdoll is turned off. Range ≥ 0.

RagdollJoint

What the author says of one bone of a ragdoll: no body of its own, or limits (and a one-way bend) of its own.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
bodybooleantrueWhether this bone gets a body of its own. Off, the bone above carries it.
custombooleanfalseUse the limits below instead of the ones the ragdoll's profile gives this joint.
swingnumber70How far the limb may swing from its bone's line, in degrees, either way. Range 0–175.
twistnumber40How far the limb may twist about its own line, in degrees, either way. Range 0–175.
bendnumber0How far it may bend, in degrees, one way only (a knee, an elbow). 0 is an ordinary swing and twist joint. Range 0–175.
foldenumAs its name saysWhich way a bend goes where the bone's name does not say. One of As its name says, Toward the facing, Away from the facing.

RigidBody2D

Puts the entity under the flat solver: static, kinematic or dynamic, with damping, gravity scale and sleep.

Explained in gameplay/physics.

FieldTypeDefaultNotes
bodyTypeenumDynamic One of Static, Kinematic, Dynamic.
gravityScalenumber1
linearDampingnumber0 Range ≥ 0.
angularDampingnumber0 Range ≥ 0.
fixedRotationbooleanfalse
bulletbooleanfalse
enabledbooleantrue

RigidBody3D

Puts the entity under the 3D solver — its own component set, so a 2D scene keeps the world it already has.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
bodyTypeenumDynamic One of Static, Kinematic, Dynamic.
layernumber0 Range 0–15.
gravityScalenumber1 Range ≥ 0.
linearDampingnumber0.05 Range ≥ 0.
angularDampingnumber0.05 Range ≥ 0.
fixedRotationbooleanfalse
continuousCollisionbooleanfalseCheck the whole path a step covers — what a bullet needs
enabledbooleantrue
massnumber0Kilograms. 0 = from its shape at the density of water (a ball of 10 cm radius is 4.2 kg). Range ≥ 0.

SegmentCollider2D

A single line segment — a one-sided wall or edge.

Explained in gameplay/physics.

FieldTypeDefaultNotes
point1Vec2(-0.5, 0)
point2Vec2(0.5, 0)
densitynumber1
frictionnumber0.3
restitutionnumber0
isSensorbooleanfalse
enabledbooleantrue
categoryBitsnumber1
maskBitsnumber65535

SixDOFJoint3D

Locks, limits or frees each translation and rotation axis independently, with optional velocity motors.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
connectedEntityEntity-1
anchorVec3(0, 0, 0)Attachment in this entity’s local frame, in world units.
axisVec3(1, 0, 0)Local X/twist direction. Must be nonzero.
normalAxisVec3(0, 1, 0)Local Y reference. Must not be parallel to the X/twist axis.
enableMotorbooleanfalse
angularVelocityVec3(0, 0, 0)Body B relative to A, in constraint axes (rad/s).
maxMotorTorquenumber10Maximum torque per motor axis (N m). Range ≥ 0.
collideConnectedbooleanfalse
enabledbooleantrue
breakForcenumber0Newtons it gives way at; 0 never. Range ≥ 0.
breakTorquenumber0Newton metres of twist it gives way at; 0 never. Range ≥ 0.
translationMotionVec3(0, 0, 0)Each axis: 0 locked, 1 limited, 2 free.
rotationMotionVec3(0, 0, 0)Each axis: 0 locked, 1 limited, 2 free.
translationLowerVec3(-100, -100, -100)
translationUpperVec3(100, 100, 100)
rotationLowerVec3(-0.5236, -0.5236, -0.5236)
rotationUpperVec3(0.5236, 0.5236, 0.5236)
linearVelocityVec3(0, 0, 0)Body B relative to A, in constraint axes (world units/s).
maxMotorForcenumber100Maximum force per translation axis (N). Range ≥ 0.

SliderJoint2D

Constrains two bodies to slide along one axis — a piston or lift.

Explained in gameplay/physics.

FieldTypeDefaultNotes
connectedEntityEntity-1
anchorAVec2(0, 0)Where the joint attaches on the connected body, in that body's frame (pixels).
anchorBVec2(0, 0)Where it attaches on this entity, in its own frame (pixels).
axisVec2(1, 0)Direction of travel, in the connected body's frame.
enableSpringbooleanfalse
hertznumber1
dampingRationumber0.5
enableLimitbooleanfalse
lowerTranslationnumber0
upperTranslationnumber0
enableMotorbooleanfalse
maxMotorForcenumber0
motorSpeednumber0
collideConnectedbooleanfalse
enabledbooleantrue

SliderJoint3D

One axis of travel between two 3D bodies — a lift or a piston, with optional limits and a motor.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
connectedEntityEntity-1
anchorVec3(0, 0, 0)Where the joint attaches, in THIS entity's frame (world units).
axisVec3(0, 1, 0)
enableLimitbooleanfalse
lowerTranslationnumber-100
upperTranslationnumber100
enableMotorbooleanfalse
motorSpeednumber0
maxMotorForcenumber0
collideConnectedbooleanfalse
enabledbooleantrue
breakForcenumber0
breakTorquenumber0
translationnumber0

SphereCollider3D

A sphere collision shape in 3D.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
radiusnumber50 Range ≥ 0.
centerVec3(0, 0, 0)
frictionnumber0.3 Range ≥ 0.
restitutionnumber0 Range 0–1.
isSensorbooleanfalse
enabledbooleantrue

SwingTwistJoint3D

A ball joint with independent twist limits, an elliptical swing cone and optional angular velocity motors.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
connectedEntityEntity-1
anchorVec3(0, 0, 0)Attachment in this entity’s local frame, in world units.
axisVec3(0, 1, 0)Local X/twist direction. Must be nonzero.
normalAxisVec3(1, 0, 0)Local Y reference. Must not be parallel to the X/twist axis.
enableMotorbooleanfalse
angularVelocityVec3(0, 0, 0)Body B relative to A, in constraint axes (rad/s).
maxMotorTorquenumber10Maximum torque per motor axis (N m). Range ≥ 0.
collideConnectedbooleanfalse
enabledbooleantrue
breakForcenumber0Newtons it gives way at; 0 never. Range ≥ 0.
breakTorquenumber0Newton metres of twist it gives way at; 0 never. Range ≥ 0.
normalHalfConeAnglenumber0.7854 Range 0–3.1416.
planeHalfConeAnglenumber0.7854 Range 0–3.1416.
twistMinAnglenumber-0.5236 Range -3.1416–3.1416.
twistMaxAnglenumber0.5236 Range -3.1416–3.1416.

ThirdPersonCamera

An eye that orbits a target under pointer control and pulls in when something solid stands between.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
targetEntitynoneThe transform this camera orbits.
distancenumber420
yawnumber0
pitchnumber15
minPitchnumber-30
maxPitchnumber70
sensitivitynumber0.2
followDampingnumber12 Range ≥ 0.
targetOffsetVec3(0, 90, 0)
obstructionbooleantrue
obstructionRadiusnumber15 Range ≥ 0.
obstructionLayersnumber0 Range 0–15, step 1.
enabledbooleantrue

ThirdPersonController

Turns input into a movement request for a CharacterController3D, and reports what the character actually did to its Animator.

Explained in gameplay/physics-3d.

FieldTypeDefaultNotes
moveSpeednumber320
accelerationnumber2400
decelerationnumber3200
rotationSpeednumber720
jumpSpeednumber0Upward speed a jump starts with. 0 = cannot jump. Range ≥ 0.
airControlnumber0.3 Range 0–1, step 0.05.
cameraRelativebooleantrue
cameraEntitynoneWhose forward the stick is read against.
idleThresholdnumber8 Range ≥ 0, step 0.05.
enabledbooleantrue

WheelJoint2D

A suspension axis plus a spinning axle — the wheel half of a vehicle.

Explained in gameplay/physics.

FieldTypeDefaultNotes
connectedEntityEntity-1
anchorAVec2(0, 0)Where the joint attaches on the connected body, in that body's frame (pixels).
anchorBVec2(0, 0)Where it attaches on this entity, in its own frame (pixels).
axisVec2(0, 1)Direction of travel, in the connected body's frame.
enableSpringbooleantrue
hertznumber5
dampingRationumber0.7
enableLimitbooleanfalse
lowerTranslationnumber0
upperTranslationnumber0
enableMotorbooleanfalse
maxMotorTorquenumber0
motorSpeednumber0
collideConnectedbooleanfalse
enabledbooleantrue