PhysicsServer3D
A server interface for low-level 3D physics access.
A server interface for low-level 3D physics access.
PhysicsServer3D is the server responsible for all 3D physics. It can directly create and manipulate all physics objects:
- A space is a self-contained world for a physics simulation. It contains bodies, areas, and joints. Its state can be queried for collision and intersection information, and several parameters of the simulation can be modified.
- A shape is a geometric shape such as a sphere, a box, a cylinder, or a polygon. It can be used for collision detection by adding it to a body/area, possibly with an extra transformation relative to the body/area's origin. Bodies/areas can have multiple (transformed) shapes added to them, and a single shape can be added to bodies/areas multiple times with different local transformations.
- A body is a physical object which can be in static, kinematic, or rigid mode. Its state (such as position and velocity) can be queried and updated. A force integration callback can be set to customize the body's physics.
- An area is a region in space which can be used to detect bodies and areas entering and exiting it. A body monitoring callback can be set to report entering/exiting body shapes, and similarly an area monitoring callback can be set. Gravity and damping can be overridden within the area by setting area parameters.
- A joint is a constraint, either between two bodies or on one body relative to a point. Parameters such as the joint bias and the rest length of a spring joint can be adjusted.
Physics objects in
PhysicsServer3Dmay be created and manipulated independently; they do not have to be tied to nodes in the scene tree. Note: All the 3D physics nodes use the physics server internally. Adding a physics node to the scene tree will cause a corresponding physics object to be created in the physics server. A rigid body node registers a callback that updates the node's transform with the transform of the respective body object in the physics server (every physics update). An area node registers a callback to inform the area node about overlaps with the respective area object in the physics server. The raycast node queries the direct state of the relevant space in the physics server.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Properties1
SingletonProperty
public static PhysicsServer3DInstance Singleton { get; }Methods177
AreaAddShapevoid
public static void AreaAddShape(Rid area, Rid shape, Transform3D? transform = default, bool disabled = false);Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
shape | Rid | — |
transform | Transform3D? | default |
disabled | bool | false |
transformIf the parameter is null, then the default value is Transform3D.Identity.
AreaAttachObjectInstanceIdvoid
public static void AreaAttachObjectInstanceId(Rid area, ulong id);Assigns the area to a descendant of ReckfellObject, so it can exist in the node tree.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
id | ulong | — |
AreaClearShapesvoid
public static void AreaClearShapes(Rid area);Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
AreaCreateRid
public static Rid AreaCreate();Creates a 3D area object in the physics server, and returns the Rid that identifies it. The default settings for the created area include a collision layer and mask set to 1, and monitorable set to false.
Use PhysicsServer3D.AreaAddShape to add shapes to it, use PhysicsServer3D.AreaSetTransform to set its transform, and use PhysicsServer3D.AreaSetSpace to add the area to a space. If you want the area to be detectable use PhysicsServer3D.AreaSetMonitorable.
RidAreaGetCollisionLayeruint
public static uint AreaGetCollisionLayer(Rid area);Returns the physics layer or layers an area belongs to.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
uintAreaGetCollisionMaskuint
public static uint AreaGetCollisionMask(Rid area);Returns the physics layer or layers an area can contact with.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
uintAreaGetObjectInstanceIdulong
public static ulong AreaGetObjectInstanceId(Rid area);Gets the instance ID of the object the area is assigned to.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
ulongAreaGetParamVariant
public static Variant AreaGetParam(Rid area, PhysicsServer3D.AreaParameter param);Returns an area parameter value. A list of available parameters is on the PhysicsServer3D.AreaParameter constants.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
param | PhysicsServer3D.AreaParameter | — |
VariantAreaGetShapeRid
public static Rid AreaGetShape(Rid area, int shapeIdx);Returns the Rid of the nth shape of an area.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
shapeIdx | int | — |
RidAreaGetShapeCountint
public static int AreaGetShapeCount(Rid area);Returns the number of shapes assigned to an area.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
intAreaGetShapeTransformTransform3D
public static Transform3D AreaGetShapeTransform(Rid area, int shapeIdx);Returns the transform matrix of a shape within an area.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
shapeIdx | int | — |
Transform3DAreaGetSpaceRid
public static Rid AreaGetSpace(Rid area);Returns the space assigned to the area.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
RidAreaGetTransformTransform3D
public static Transform3D AreaGetTransform(Rid area);Returns the transform matrix for an area.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
Transform3DAreaRemoveShapevoid
public static void AreaRemoveShape(Rid area, int shapeIdx);Removes a shape from an area. It does not delete the shape, so it can be reassigned later.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
shapeIdx | int | — |
AreaSetAreaMonitorCallbackvoid
public static void AreaSetAreaMonitorCallback(Rid area, Callable callback);Sets the area's area monitor callback. This callback will be called when any other (shape of an) area enters or exits (a shape of) the given area, and must take the following five parameters:
- an integer
status: eitherPhysicsServer3D.AreaBodyStatus.AddedorPhysicsServer3D.AreaBodyStatus.Removeddepending on whether the other area's shape entered or exited the area, - an
Ridarea_rid: theRidof the other area that entered or exited the area, - an integer
instance_id: theObjectIDattached to the other area, - an integer
area_shape_idx: the index of the shape of the other area that entered or exited the area, - an integer
self_shape_idx: the index of the shape of the area where the other area entered or exited. By counting (or keeping track of) the shapes that enter and exit, it can be determined if an area (with all its shapes) is entering for the first time or exiting for the last time.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
callback | Callable | — |
AreaSetCollisionLayervoid
public static void AreaSetCollisionLayer(Rid area, uint layer);Assigns the area to one or many physics layers.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
layer | uint | — |
AreaSetCollisionMaskvoid
public static void AreaSetCollisionMask(Rid area, uint mask);Sets which physics layers the area will monitor.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
mask | uint | — |
AreaSetMonitorCallbackvoid
public static void AreaSetMonitorCallback(Rid area, Callable callback);Sets the area's body monitor callback. This callback will be called when any other (shape of a) body enters or exits (a shape of) the given area, and must take the following five parameters:
- an integer
status: eitherPhysicsServer3D.AreaBodyStatus.AddedorPhysicsServer3D.AreaBodyStatus.Removeddepending on whether the other body shape entered or exited the area, - an
Ridbody_rid: theRidof the body that entered or exited the area, - an integer
instance_id: theObjectIDattached to the body, - an integer
body_shape_idx: the index of the shape of the body that entered or exited the area, - an integer
self_shape_idx: the index of the shape of the area where the body entered or exited. By counting (or keeping track of) the shapes that enter and exit, it can be determined if a body (with all its shapes) is entering for the first time or exiting for the last time.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
callback | Callable | — |
AreaSetMonitorablevoid
public static void AreaSetMonitorable(Rid area, bool monitorable);| Name | Type | Default |
|---|---|---|
area | Rid | — |
monitorable | bool | — |
AreaSetParamvoid
public static void AreaSetParam(Rid area, PhysicsServer3D.AreaParameter param, Variant value);Sets the value for an area parameter. A list of available parameters is on the PhysicsServer3D.AreaParameter constants.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
param | PhysicsServer3D.AreaParameter | — |
value | Variant | — |
AreaSetRayPickablevoid
public static void AreaSetRayPickable(Rid area, bool enable);Sets object pickable with rays.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
enable | bool | — |
AreaSetShapevoid
public static void AreaSetShape(Rid area, int shapeIdx, Rid shape);Substitutes a given area shape by another. The old shape is selected by its index, the new one by its Rid.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
shapeIdx | int | — |
shape | Rid | — |
AreaSetShapeDisabledvoid
public static void AreaSetShapeDisabled(Rid area, int shapeIdx, bool disabled);| Name | Type | Default |
|---|---|---|
area | Rid | — |
shapeIdx | int | — |
disabled | bool | — |
AreaSetShapeTransformvoid
public static void AreaSetShapeTransform(Rid area, int shapeIdx, Transform3D transform);Sets the transform matrix for an area shape.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
shapeIdx | int | — |
transform | Transform3D | — |
AreaSetSpacevoid
public static void AreaSetSpace(Rid area, Rid space);Assigns a space to the area.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
space | Rid | — |
AreaSetTransformvoid
public static void AreaSetTransform(Rid area, Transform3D transform);Sets the transform matrix for an area.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
transform | Transform3D | — |
BodyAddCollisionExceptionvoid
public static void BodyAddCollisionException(Rid body, Rid exceptedBody);Adds a body to the list of bodies exempt from collisions.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
exceptedBody | Rid | — |
BodyAddConstantCentralForcevoid
public static void BodyAddConstantCentralForce(Rid body, Vector3 force);Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with body_set_constant_force(body, Vector3(0, 0, 0)).
This is equivalent to using PhysicsServer3D.BodyAddConstantForce at the body's center of mass.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
force | Vector3 | — |
BodyAddConstantForcevoid
public static void BodyAddConstantForce(Rid body, Vector3 force, Vector3? position = default);Adds a constant positioned force to the body that keeps being applied over time until cleared with body_set_constant_force(body, Vector3(0, 0, 0)).
position is the offset from the body origin in global coordinates.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
force | Vector3 | — |
position | Vector3? | default |
positionIf the parameter is null, then the default value is new Vector3(0.0f, 0.0f, 0.0f).
BodyAddConstantTorquevoid
public static void BodyAddConstantTorque(Rid body, Vector3 torque);Adds a constant rotational force without affecting position that keeps being applied over time until cleared with body_set_constant_torque(body, Vector3(0, 0, 0)).
| Name | Type | Default |
|---|---|---|
body | Rid | — |
torque | Vector3 | — |
BodyAddShapevoid
public static void BodyAddShape(Rid body, Rid shape, Transform3D? transform = default, bool disabled = false);Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
shape | Rid | — |
transform | Transform3D? | default |
disabled | bool | false |
transformIf the parameter is null, then the default value is Transform3D.Identity.
BodyApplyCentralForcevoid
public static void BodyApplyCentralForce(Rid body, Vector3 force);Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
This is equivalent to using PhysicsServer3D.BodyApplyForce at the body's center of mass.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
force | Vector3 | — |
BodyApplyCentralImpulsevoid
public static void BodyApplyCentralImpulse(Rid body, Vector3 impulse);Applies a directional impulse without affecting rotation.
An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
This is equivalent to using PhysicsServer3D.BodyApplyImpulse at the body's center of mass.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
impulse | Vector3 | — |
BodyApplyForcevoid
public static void BodyApplyForce(Rid body, Vector3 force, Vector3? position = default);Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
position is the offset from the body origin in global coordinates.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
force | Vector3 | — |
position | Vector3? | default |
positionIf the parameter is null, then the default value is new Vector3(0.0f, 0.0f, 0.0f).
BodyApplyImpulsevoid
public static void BodyApplyImpulse(Rid body, Vector3 impulse, Vector3? position = default);Applies a positioned impulse to the body.
An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
position is the offset from the body origin in global coordinates.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
impulse | Vector3 | — |
position | Vector3? | default |
positionIf the parameter is null, then the default value is new Vector3(0.0f, 0.0f, 0.0f).
BodyApplyTorquevoid
public static void BodyApplyTorque(Rid body, Vector3 torque);Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
torque | Vector3 | — |
BodyApplyTorqueImpulsevoid
public static void BodyApplyTorqueImpulse(Rid body, Vector3 impulse);Applies a rotational impulse to the body without affecting the position. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
| Name | Type | Default |
|---|---|---|
body | Rid | — |
impulse | Vector3 | — |
BodyAttachObjectInstanceIdvoid
public static void BodyAttachObjectInstanceId(Rid body, ulong id);Assigns the area to a descendant of ReckfellObject, so it can exist in the node tree.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
id | ulong | — |
BodyClearShapesvoid
public static void BodyClearShapes(Rid body);Removes all shapes from a body.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
BodyCreateRid
public static Rid BodyCreate();Creates a 3D body object in the physics server, and returns the Rid that identifies it. The default settings for the created area include a collision layer and mask set to 1, and body mode set to PhysicsServer3D.BodyMode.Rigid.
Use PhysicsServer3D.BodyAddShape to add shapes to it, use PhysicsServer3D.BodySetState to set its transform, and use PhysicsServer3D.BodySetSpace to add the body to a space.
RidBodyGetCollisionLayeruint
public static uint BodyGetCollisionLayer(Rid body);Returns the physics layer or layers a body belongs to.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
uintBodyGetCollisionMaskuint
public static uint BodyGetCollisionMask(Rid body);Returns the physics layer or layers a body can collide with.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
uintBodyGetCollisionPriorityfloat
public static float BodyGetCollisionPriority(Rid body);Returns the body's collision priority.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
floatBodyGetConstantForceVector3
public static Vector3 BodyGetConstantForce(Rid body);Returns the body's total constant positional forces applied during each physics update.
See PhysicsServer3D.BodyAddConstantForce and PhysicsServer3D.BodyAddConstantCentralForce.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
Vector3BodyGetConstantTorqueVector3
public static Vector3 BodyGetConstantTorque(Rid body);Returns the body's total constant rotational forces applied during each physics update.
See PhysicsServer3D.BodyAddConstantTorque.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
Vector3BodyGetDirectStatePhysicsDirectBodyState3D
public static PhysicsDirectBodyState3D BodyGetDirectState(Rid body);Returns the PhysicsDirectBodyState3D of the body. Returns null if the body is destroyed or removed from the physics space.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
PhysicsDirectBodyState3DBodyGetMaxContactsReportedint
public static int BodyGetMaxContactsReported(Rid body);Returns the maximum contacts that can be reported. See PhysicsServer3D.BodySetMaxContactsReported.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
intBodyGetModePhysicsServer3D.BodyMode
public static PhysicsServer3D.BodyMode BodyGetMode(Rid body);Returns the body mode.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
PhysicsServer3D.BodyModeBodyGetObjectInstanceIdulong
public static ulong BodyGetObjectInstanceId(Rid body);Gets the instance ID of the object the area is assigned to.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
ulongBodyGetParamVariant
public static Variant BodyGetParam(Rid body, PhysicsServer3D.BodyParameter param);Returns the value of a body parameter. A list of available parameters is on the PhysicsServer3D.BodyParameter constants.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
param | PhysicsServer3D.BodyParameter | — |
VariantBodyGetShapeRid
public static Rid BodyGetShape(Rid body, int shapeIdx);Returns the Rid of the nth shape of a body.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
shapeIdx | int | — |
RidBodyGetShapeCountint
public static int BodyGetShapeCount(Rid body);Returns the number of shapes assigned to a body.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
intBodyGetShapeTransformTransform3D
public static Transform3D BodyGetShapeTransform(Rid body, int shapeIdx);Returns the transform matrix of a body shape.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
shapeIdx | int | — |
Transform3DBodyGetSpaceRid
public static Rid BodyGetSpace(Rid body);Returns the Rid of the space assigned to a body.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
RidBodyGetStateVariant
public static Variant BodyGetState(Rid body, PhysicsServer3D.BodyState state);Returns a body state.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
state | PhysicsServer3D.BodyState | — |
VariantBodyIsAxisLockedbool
public static bool BodyIsAxisLocked(Rid body, PhysicsServer3D.BodyAxis axis);| Name | Type | Default |
|---|---|---|
body | Rid | — |
axis | PhysicsServer3D.BodyAxis | — |
boolBodyIsContinuousCollisionDetectionEnabledbool
public static bool BodyIsContinuousCollisionDetectionEnabled(Rid body);If true, the continuous collision detection mode is enabled.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
boolBodyIsOmittingForceIntegrationbool
public static bool BodyIsOmittingForceIntegration(Rid body);Returns true if the body is omitting the standard force integration. See PhysicsServer3D.BodySetOmitForceIntegration.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
boolBodyRemoveCollisionExceptionvoid
public static void BodyRemoveCollisionException(Rid body, Rid exceptedBody);Removes a body from the list of bodies exempt from collisions. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
exceptedBody | Rid | — |
BodyRemoveShapevoid
public static void BodyRemoveShape(Rid body, int shapeIdx);Removes a shape from a body. The shape is not deleted, so it can be reused afterwards.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
shapeIdx | int | — |
BodyResetMassPropertiesvoid
public static void BodyResetMassProperties(Rid body);Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using PhysicsServer3D.BodySetParam.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
BodySetAxisLockvoid
public static void BodySetAxisLock(Rid body, PhysicsServer3D.BodyAxis axis, bool @lock);| Name | Type | Default |
|---|---|---|
body | Rid | — |
axis | PhysicsServer3D.BodyAxis | — |
lock | bool | — |
BodySetAxisVelocityvoid
public static void BodySetAxisVelocity(Rid body, Vector3 axisVelocity);Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
axisVelocity | Vector3 | — |
BodySetCollisionLayervoid
public static void BodySetCollisionLayer(Rid body, uint layer);Sets the physics layer or layers a body belongs to.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
layer | uint | — |
BodySetCollisionMaskvoid
public static void BodySetCollisionMask(Rid body, uint mask);Sets the physics layer or layers a body can collide with.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
mask | uint | — |
BodySetCollisionPriorityvoid
public static void BodySetCollisionPriority(Rid body, float priority);Sets the body's collision priority.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
priority | float | — |
BodySetConstantForcevoid
public static void BodySetConstantForce(Rid body, Vector3 force);Sets the body's total constant positional forces applied during each physics update.
See PhysicsServer3D.BodyAddConstantForce and PhysicsServer3D.BodyAddConstantCentralForce.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
force | Vector3 | — |
BodySetConstantTorquevoid
public static void BodySetConstantTorque(Rid body, Vector3 torque);Sets the body's total constant rotational forces applied during each physics update.
See PhysicsServer3D.BodyAddConstantTorque.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
torque | Vector3 | — |
BodySetEnableContinuousCollisionDetectionvoid
public static void BodySetEnableContinuousCollisionDetection(Rid body, bool enable);If true, the continuous collision detection mode is enabled.
Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
enable | bool | — |
BodySetForceIntegrationCallbackvoid
public static void BodySetForceIntegrationCallback(Rid body, Callable callable, Variant userdata = default);Sets the body's custom force integration callback function to callable. Use an empty Callable ([code skip-lint]Callable()) to clear the custom callback. The function callable will be called every physics tick, before the standard force integration (see [PhysicsServer3D.BodySetOmitForceIntegration](/en/docs/api/physicsserver3d#member-bodysetomitforceintegration-28485a0673)). It can be used for example to update the body's linear and angular velocity based on contact with other bodies. If userdatais notnull, the function callable` must take the following two parameters:
state: aPhysicsDirectBodyState3D, used to retrieve and modify the body's state,Variant; its value will be theuserdatapassed into this method. Ifuserdataisnull, thencallablemust take only thestateparameter.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
callable | Callable | — |
userdata | Variant | default |
BodySetMaxContactsReportedvoid
public static void BodySetMaxContactsReported(Rid body, int amount);Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies. This is enabled by setting the maximum number of contacts reported to a number greater than 0.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
amount | int | — |
BodySetModevoid
public static void BodySetMode(Rid body, PhysicsServer3D.BodyMode mode);Sets the body mode.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
mode | PhysicsServer3D.BodyMode | — |
BodySetOmitForceIntegrationvoid
public static void BodySetOmitForceIntegration(Rid body, bool enable);Sets whether the body omits the standard force integration. If enable is true, the body will not automatically use applied forces, torques, and damping to update the body's linear and angular velocity. In this case, PhysicsServer3D.BodySetForceIntegrationCallback can be used to manually update the linear and angular velocity instead.
This method is called when the property RigidBody3D.CustomIntegrator is set.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
enable | bool | — |
BodySetParamvoid
public static void BodySetParam(Rid body, PhysicsServer3D.BodyParameter param, Variant value);Sets a body parameter. A list of available parameters is on the PhysicsServer3D.BodyParameter constants.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
param | PhysicsServer3D.BodyParameter | — |
value | Variant | — |
BodySetRayPickablevoid
public static void BodySetRayPickable(Rid body, bool enable);Sets the body pickable with rays if enable is set.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
enable | bool | — |
BodySetShapevoid
public static void BodySetShape(Rid body, int shapeIdx, Rid shape);Substitutes a given body shape by another. The old shape is selected by its index, the new one by its Rid.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
shapeIdx | int | — |
shape | Rid | — |
BodySetShapeDisabledvoid
public static void BodySetShapeDisabled(Rid body, int shapeIdx, bool disabled);| Name | Type | Default |
|---|---|---|
body | Rid | — |
shapeIdx | int | — |
disabled | bool | — |
BodySetShapeTransformvoid
public static void BodySetShapeTransform(Rid body, int shapeIdx, Transform3D transform);Sets the transform matrix for a body shape.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
shapeIdx | int | — |
transform | Transform3D | — |
BodySetSpacevoid
public static void BodySetSpace(Rid body, Rid space);Assigns a space to the body (see PhysicsServer3D.SpaceCreate).
| Name | Type | Default |
|---|---|---|
body | Rid | — |
space | Rid | — |
BodySetStatevoid
public static void BodySetState(Rid body, PhysicsServer3D.BodyState state, Variant value);Sets a body state.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
state | PhysicsServer3D.BodyState | — |
value | Variant | — |
BodySetStateSyncCallbackvoid
public static void BodySetStateSyncCallback(Rid body, Callable callable);Sets the body's state synchronization callback function to callable. Use an empty Callable ([code skip-lint]Callable()) to clear the callback. The function callablewill be called every physics frame, assuming that the body was active during the previous physics tick, and can be used to fetch the latest state from the physics server. The functioncallable` must take the following parameters:
state: aPhysicsDirectBodyState3D, used to retrieve the body's state.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
callable | Callable | — |
BodyTestMotionbool
public static bool BodyTestMotion(Rid body, PhysicsTestMotionParameters3D parameters, PhysicsTestMotionResult3D result = null);Returns true if a collision would result from moving along a motion vector from a given point in space. PhysicsTestMotionParameters3D is passed to set motion parameters. PhysicsTestMotionResult3D can be passed to return additional information.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
parameters | PhysicsTestMotionParameters3D | — |
result | PhysicsTestMotionResult3D | null |
boolBoxShapeCreateRid
public static Rid BoxShapeCreate();Creates a 3D box shape in the physics server, and returns the Rid that identifies it. Use PhysicsServer3D.ShapeSetData to set the box's half-extents.
RidCapsuleShapeCreateRid
public static Rid CapsuleShapeCreate();Creates a 3D capsule shape in the physics server, and returns the Rid that identifies it. Use PhysicsServer3D.ShapeSetData to set the capsule's height and radius.
RidConcavePolygonShapeCreateRid
public static Rid ConcavePolygonShapeCreate();Creates a 3D concave polygon shape in the physics server, and returns the Rid that identifies it. Use PhysicsServer3D.ShapeSetData to set the concave polygon's triangles.
RidConeTwistJointGetParamfloat
public static float ConeTwistJointGetParam(Rid joint, PhysicsServer3D.ConeTwistJointParam param);Gets a cone twist joint parameter.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
param | PhysicsServer3D.ConeTwistJointParam | — |
floatConeTwistJointSetParamvoid
public static void ConeTwistJointSetParam(Rid joint, PhysicsServer3D.ConeTwistJointParam param, float value);Sets a cone twist joint parameter.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
param | PhysicsServer3D.ConeTwistJointParam | — |
value | float | — |
ConvexPolygonShapeCreateRid
public static Rid ConvexPolygonShapeCreate();Creates a 3D convex polygon shape in the physics server, and returns the Rid that identifies it. Use PhysicsServer3D.ShapeSetData to set the convex polygon's points.
RidCustomShapeCreateRid
public static Rid CustomShapeCreate();Creates a custom shape in the physics server, and returns the Rid that identifies it. Use PhysicsServer3D.ShapeSetData to set the shape's data.
Note: Custom shapes are not supported by the built-in physics servers, so calling this method always produces an error when using Reckfell Physics or Jolt Physics. Custom physics servers implemented as ReckfellExtensions may support a custom shape.
RidCylinderShapeCreateRid
public static Rid CylinderShapeCreate();Creates a 3D cylinder shape in the physics server, and returns the Rid that identifies it. Use PhysicsServer3D.ShapeSetData to set the cylinder's height and radius.
RidFreeRidvoid
Generic6DofJointGetAngularTargetRotationQuaternion
public static Quaternion Generic6DofJointGetAngularTargetRotation(Rid joint);Returns the target angular orientation of a generic 6DOF joint as a body-space quaternion describing the desired orientation of body B relative to body A. Note: Only for Jolt backend. Other 3D physics backends return the identity quaternion.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
QuaternionGeneric6DofJointGetFlagbool
public static bool Generic6DofJointGetFlag(Rid joint, Vector3.Axis axis, PhysicsServer3D.G6DofJointAxisFlag flag);Returns the value of a generic 6DOF joint flag.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
axis | Vector3.Axis | — |
flag | PhysicsServer3D.G6DofJointAxisFlag | — |
boolGeneric6DofJointGetParamfloat
public static float Generic6DofJointGetParam(Rid joint, Vector3.Axis axis, PhysicsServer3D.G6DofJointAxisParam param);Returns the value of a generic 6DOF joint parameter.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
axis | Vector3.Axis | — |
param | PhysicsServer3D.G6DofJointAxisParam | — |
floatGeneric6DofJointSetAngularTargetRotationvoid
public static void Generic6DofJointSetAngularTargetRotation(Rid joint, Quaternion targetRotation);Sets the target angular orientation of a generic 6DOF joint as a body-space quaternion describing the desired orientation of body B relative to body A. Note: Only for Jolt backend. Other 3D physics backends may ignore this value.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
targetRotation | Quaternion | — |
Generic6DofJointSetFlagvoid
public static void Generic6DofJointSetFlag(Rid joint, Vector3.Axis axis, PhysicsServer3D.G6DofJointAxisFlag flag, bool enable);Sets the value of a given generic 6DOF joint flag.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
axis | Vector3.Axis | — |
flag | PhysicsServer3D.G6DofJointAxisFlag | — |
enable | bool | — |
Generic6DofJointSetParamvoid
public static void Generic6DofJointSetParam(Rid joint, Vector3.Axis axis, PhysicsServer3D.G6DofJointAxisParam param, float value);Sets the value of a given generic 6DOF joint parameter.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
axis | Vector3.Axis | — |
param | PhysicsServer3D.G6DofJointAxisParam | — |
value | float | — |
GetProcessInfoint
public static int GetProcessInfo(PhysicsServer3D.ProcessInfo processInfo);Returns the value of a physics engine state specified by process_info.
| Name | Type | Default |
|---|---|---|
processInfo | PhysicsServer3D.ProcessInfo | — |
intHeightmapShapeCreateRid
public static Rid HeightmapShapeCreate();Creates a 3D heightmap shape in the physics server, and returns the Rid that identifies it. Use PhysicsServer3D.ShapeSetData to set the heightmap's data.
RidHingeJointGetFlagbool
public static bool HingeJointGetFlag(Rid joint, PhysicsServer3D.HingeJointFlag flag);Gets a hinge joint flag.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
flag | PhysicsServer3D.HingeJointFlag | — |
boolHingeJointGetParamfloat
public static float HingeJointGetParam(Rid joint, PhysicsServer3D.HingeJointParam param);Gets a hinge joint parameter.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
param | PhysicsServer3D.HingeJointParam | — |
floatHingeJointSetFlagvoid
public static void HingeJointSetFlag(Rid joint, PhysicsServer3D.HingeJointFlag flag, bool enabled);Sets a hinge joint flag.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
flag | PhysicsServer3D.HingeJointFlag | — |
enabled | bool | — |
HingeJointSetParamvoid
public static void HingeJointSetParam(Rid joint, PhysicsServer3D.HingeJointParam param, float value);Sets a hinge joint parameter.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
param | PhysicsServer3D.HingeJointParam | — |
value | float | — |
JointClearvoid
public static void JointClear(Rid joint);| Name | Type | Default |
|---|---|---|
joint | Rid | — |
JointCreateRid
public static Rid JointCreate();RidJointDisableCollisionsBetweenBodiesvoid
public static void JointDisableCollisionsBetweenBodies(Rid joint, bool disable);Sets whether the bodies attached to the Joint3D will collide with each other.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
disable | bool | — |
JointGetSolverPriorityint
public static int JointGetSolverPriority(Rid joint);Gets the priority value of the Joint3D.
Note: Only supported when using ReckfellPhysics3D. This method always returns 1 when using Jolt Physics, as it does not support joint solver priority.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
intJointGetTypePhysicsServer3D.JointType
public static PhysicsServer3D.JointType JointGetType(Rid joint);Returns the type of the Joint3D.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
PhysicsServer3D.JointTypeJointIsDisabledCollisionsBetweenBodiesbool
public static bool JointIsDisabledCollisionsBetweenBodies(Rid joint);Returns whether the bodies attached to the Joint3D will collide with each other.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
boolJointMakeConeTwistvoid
public static void JointMakeConeTwist(Rid joint, Rid bodyA, Transform3D localRefA, Rid bodyB, Transform3D localRefB);| Name | Type | Default |
|---|---|---|
joint | Rid | — |
bodyA | Rid | — |
localRefA | Transform3D | — |
bodyB | Rid | — |
localRefB | Transform3D | — |
JointMakeGeneric6Dofvoid
public static void JointMakeGeneric6Dof(Rid joint, Rid bodyA, Transform3D localRefA, Rid bodyB, Transform3D localRefB);Make the joint a generic six degrees of freedom (6DOF) joint. Use PhysicsServer3D.Generic6DofJointSetFlag and PhysicsServer3D.Generic6DofJointSetParam to set the joint's flags and parameters respectively.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
bodyA | Rid | — |
localRefA | Transform3D | — |
bodyB | Rid | — |
localRefB | Transform3D | — |
JointMakeHingevoid
public static void JointMakeHinge(Rid joint, Rid bodyA, Transform3D hingeA, Rid bodyB, Transform3D hingeB);| Name | Type | Default |
|---|---|---|
joint | Rid | — |
bodyA | Rid | — |
hingeA | Transform3D | — |
bodyB | Rid | — |
hingeB | Transform3D | — |
JointMakePinvoid
public static void JointMakePin(Rid joint, Rid bodyA, Vector3 localA, Rid bodyB, Vector3 localB);| Name | Type | Default |
|---|---|---|
joint | Rid | — |
bodyA | Rid | — |
localA | Vector3 | — |
bodyB | Rid | — |
localB | Vector3 | — |
JointMakeSlidervoid
public static void JointMakeSlider(Rid joint, Rid bodyA, Transform3D localRefA, Rid bodyB, Transform3D localRefB);| Name | Type | Default |
|---|---|---|
joint | Rid | — |
bodyA | Rid | — |
localRefA | Transform3D | — |
bodyB | Rid | — |
localRefB | Transform3D | — |
JointSetSolverPriorityvoid
public static void JointSetSolverPriority(Rid joint, int priority);Sets the priority value of the Joint3D. Note: Only supported when using ReckfellPhysics3D. This method has no effect when using Jolt Physics, as it does not support joint solver priority.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
priority | int | — |
PinJointGetLocalAVector3
public static Vector3 PinJointGetLocalA(Rid joint);Returns position of the joint in the local space of body a of the joint.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
Vector3PinJointGetLocalBVector3
public static Vector3 PinJointGetLocalB(Rid joint);Returns position of the joint in the local space of body b of the joint.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
Vector3PinJointGetParamfloat
public static float PinJointGetParam(Rid joint, PhysicsServer3D.PinJointParam param);Gets a pin joint parameter.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
param | PhysicsServer3D.PinJointParam | — |
floatPinJointSetLocalAvoid
public static void PinJointSetLocalA(Rid joint, Vector3 localA);Sets position of the joint in the local space of body a of the joint.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
localA | Vector3 | — |
PinJointSetLocalBvoid
public static void PinJointSetLocalB(Rid joint, Vector3 localB);Sets position of the joint in the local space of body b of the joint.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
localB | Vector3 | — |
PinJointSetParamvoid
public static void PinJointSetParam(Rid joint, PhysicsServer3D.PinJointParam param, float value);Sets a pin joint parameter.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
param | PhysicsServer3D.PinJointParam | — |
value | float | — |
SeparationRayShapeCreateRid
public static Rid SeparationRayShapeCreate();Creates a 3D separation ray shape in the physics server, and returns the Rid that identifies it. Use PhysicsServer3D.ShapeSetData to set the shape's length and slide_on_slope properties.
RidSetActivevoid
public static void SetActive(bool active);Activates or deactivates the 3D physics engine.
| Name | Type | Default |
|---|---|---|
active | bool | — |
ShapeGetDataVariant
public static Variant ShapeGetData(Rid shape);Returns the shape data that configures the shape, such as the half-extents of a box or the triangles of a concave (trimesh) shape. See PhysicsServer3D.ShapeSetData for the precise format of this data in each case.
| Name | Type | Default |
|---|---|---|
shape | Rid | — |
VariantShapeGetMarginfloat
public static float ShapeGetMargin(Rid shape);Returns the collision margin for the shape.
Note: This is not used in Reckfell Physics, so will always return 0.
| Name | Type | Default |
|---|---|---|
shape | Rid | — |
floatShapeGetTypePhysicsServer3D.ShapeType
public static PhysicsServer3D.ShapeType ShapeGetType(Rid shape);Returns the shape's type.
| Name | Type | Default |
|---|---|---|
shape | Rid | — |
PhysicsServer3D.ShapeTypeShapeSetDatavoid
public static void ShapeSetData(Rid shape, Variant data);Sets the shape data that configures the shape. The data to be passed depends on the shape's type (see PhysicsServer3D.ShapeGetType):
PhysicsServer3D.ShapeType.WorldBoundary: aPlane,PhysicsServer3D.ShapeType.SeparationRay: a dictionary containing the key"length"with a [float] value and the key"slide_on_slope"with a [bool] value,PhysicsServer3D.ShapeType.Sphere: a [float] that is the radius of the sphere,PhysicsServer3D.ShapeType.Box: aVector3containing the half-extents of the box,PhysicsServer3D.ShapeType.Capsule: a dictionary containing the keys"height"and"radius"with [float] values,PhysicsServer3D.ShapeType.Cylinder: a dictionary containing the keys"height"and"radius"with [float] values,PhysicsServer3D.ShapeType.ConvexPolygon: aVector3[]of points defining a convex polygon (the shape will be the convex hull of the points),PhysicsServer3D.ShapeType.ConcavePolygon: a dictionary containing the key"faces"with aVector3[]value (with a length divisible by 3, so that each 3-tuple of points forms a face) and the key"backface_collision"with a [bool] value,PhysicsServer3D.ShapeType.Heightmap: a dictionary containing the keys"width"and"depth"withfloat[], or adouble[]if Reckfell was compiled with theprecision=doubleoption), and optionally the keys"min_height"and"max_height"with [float] values,PhysicsServer3D.ShapeType.SoftBody: the inputdatais ignored and this method has no effect,PhysicsServer3D.ShapeType.Custom: the inputdatais interpreted by a custom physics server, if it supports custom shapes.
| Name | Type | Default |
|---|---|---|
shape | Rid | — |
data | Variant | — |
ShapeSetMarginvoid
public static void ShapeSetMargin(Rid shape, float margin);Sets the collision margin for the shape. Note: This is not used in Reckfell Physics.
| Name | Type | Default |
|---|---|---|
shape | Rid | — |
margin | float | — |
SliderJointGetParamfloat
public static float SliderJointGetParam(Rid joint, PhysicsServer3D.SliderJointParam param);Gets a slider joint parameter.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
param | PhysicsServer3D.SliderJointParam | — |
floatSliderJointSetParamvoid
public static void SliderJointSetParam(Rid joint, PhysicsServer3D.SliderJointParam param, float value);Gets a slider joint parameter.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
param | PhysicsServer3D.SliderJointParam | — |
value | float | — |
SoftBodyAddCollisionExceptionvoid
public static void SoftBodyAddCollisionException(Rid body, Rid bodyB);Adds the given body to the list of bodies exempt from collisions.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
bodyB | Rid | — |
SoftBodyApplyCentralForcevoid
public static void SoftBodyApplyCentralForce(Rid body, Vector3 force);Distributes and applies a force to all points. A force is time dependent and meant to be applied every physics update.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
force | Vector3 | — |
SoftBodyApplyCentralImpulsevoid
public static void SoftBodyApplyCentralImpulse(Rid body, Vector3 impulse);Distributes and applies an impulse to all points. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
| Name | Type | Default |
|---|---|---|
body | Rid | — |
impulse | Vector3 | — |
SoftBodyApplyPointForcevoid
public static void SoftBodyApplyPointForce(Rid body, int pointIndex, Vector3 force);Applies a force to a point. A force is time dependent and meant to be applied every physics update.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
pointIndex | int | — |
force | Vector3 | — |
SoftBodyApplyPointImpulsevoid
public static void SoftBodyApplyPointImpulse(Rid body, int pointIndex, Vector3 impulse);Applies an impulse to a point. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
| Name | Type | Default |
|---|---|---|
body | Rid | — |
pointIndex | int | — |
impulse | Vector3 | — |
SoftBodyCreateRid
public static Rid SoftBodyCreate();Creates a new soft body and returns its internal Rid.
RidSoftBodyGetBoundsAabb
public static Aabb SoftBodyGetBounds(Rid body);Returns the bounds of the given soft body in global coordinates.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
AabbSoftBodyGetCollisionLayeruint
public static uint SoftBodyGetCollisionLayer(Rid body);Returns the physics layer or layers that the given soft body belongs to.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
uintSoftBodyGetCollisionMaskuint
public static uint SoftBodyGetCollisionMask(Rid body);Returns the physics layer or layers that the given soft body can collide with.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
uintSoftBodyGetDampingCoefficientfloat
public static float SoftBodyGetDampingCoefficient(Rid body);Returns the damping coefficient of the given soft body.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
floatSoftBodyGetDragCoefficientfloat
public static float SoftBodyGetDragCoefficient(Rid body);Returns the drag coefficient of the given soft body.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
floatSoftBodyGetLinearStiffnessfloat
public static float SoftBodyGetLinearStiffness(Rid body);Returns the linear stiffness of the given soft body.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
floatSoftBodyGetPointGlobalPositionVector3
public static Vector3 SoftBodyGetPointGlobalPosition(Rid body, int pointIndex);Returns the current position of the given soft body point in global coordinates.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
pointIndex | int | — |
Vector3SoftBodyGetPressureCoefficientfloat
public static float SoftBodyGetPressureCoefficient(Rid body);Returns the pressure coefficient of the given soft body.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
floatSoftBodyGetShrinkingFactorfloat
public static float SoftBodyGetShrinkingFactor(Rid body);Returns the shrinking factor of the given soft body.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
floatSoftBodyGetSimulationPrecisionint
public static int SoftBodyGetSimulationPrecision(Rid body);Returns the simulation precision of the given soft body.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
intSoftBodyGetSpaceRid
public static Rid SoftBodyGetSpace(Rid body);Returns the Rid of the space assigned to the given soft body.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
RidSoftBodyGetStateVariant
public static Variant SoftBodyGetState(Rid body, PhysicsServer3D.BodyState state);Returns the given soft body state.
Note: Reckfell's default physics implementation does not support PhysicsServer3D.BodyState.LinearVelocity, PhysicsServer3D.BodyState.AngularVelocity, PhysicsServer3D.BodyState.Sleeping, or PhysicsServer3D.BodyState.CanSleep.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
state | PhysicsServer3D.BodyState | — |
VariantSoftBodyGetTotalMassfloat
public static float SoftBodyGetTotalMass(Rid body);Returns the total mass assigned to the given soft body.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
floatSoftBodyIsPointPinnedbool
public static bool SoftBodyIsPointPinned(Rid body, int pointIndex);Returns whether the given soft body point is pinned.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
pointIndex | int | — |
boolSoftBodyMovePointvoid
public static void SoftBodyMovePoint(Rid body, int pointIndex, Vector3 globalPosition);Moves the given soft body point to a position in global coordinates.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
pointIndex | int | — |
globalPosition | Vector3 | — |
SoftBodyPinPointvoid
public static void SoftBodyPinPoint(Rid body, int pointIndex, bool pin);Pins or unpins the given soft body point based on the value of pin.
Note: Pinning a point effectively makes it kinematic, preventing it from being affected by forces, but you can still move it using PhysicsServer3D.SoftBodyMovePoint.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
pointIndex | int | — |
pin | bool | — |
SoftBodyRemoveAllPinnedPointsvoid
public static void SoftBodyRemoveAllPinnedPoints(Rid body);Unpins all points of the given soft body.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
SoftBodyRemoveCollisionExceptionvoid
public static void SoftBodyRemoveCollisionException(Rid body, Rid bodyB);Removes the given body from the list of bodies exempt from collisions.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
bodyB | Rid | — |
SoftBodySetCollisionLayervoid
public static void SoftBodySetCollisionLayer(Rid body, uint layer);Sets the physics layer or layers the given soft body belongs to.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
layer | uint | — |
SoftBodySetCollisionMaskvoid
public static void SoftBodySetCollisionMask(Rid body, uint mask);Sets the physics layer or layers the given soft body can collide with.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
mask | uint | — |
SoftBodySetDampingCoefficientvoid
public static void SoftBodySetDampingCoefficient(Rid body, float dampingCoefficient);Sets the damping coefficient of the given soft body. Higher values will slow down the body more noticeably when forces are applied.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
dampingCoefficient | float | — |
SoftBodySetDragCoefficientvoid
public static void SoftBodySetDragCoefficient(Rid body, float dragCoefficient);Sets the drag coefficient of the given soft body. Higher values increase this body's air resistance. Note: This value is currently unused by Reckfell's default physics implementation.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
dragCoefficient | float | — |
SoftBodySetLinearStiffnessvoid
public static void SoftBodySetLinearStiffness(Rid body, float stiffness);Sets the linear stiffness of the given soft body. Higher values will result in a stiffer body, while lower values will increase the body's ability to bend. The value can be between 0.0 and 1.0 (inclusive).
| Name | Type | Default |
|---|---|---|
body | Rid | — |
stiffness | float | — |
SoftBodySetMeshvoid
public static void SoftBodySetMesh(Rid body, Rid mesh);Sets the mesh of the given soft body.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
mesh | Rid | — |
SoftBodySetPressureCoefficientvoid
public static void SoftBodySetPressureCoefficient(Rid body, float pressureCoefficient);Sets the pressure coefficient of the given soft body. Simulates pressure build-up from inside this body. Higher values increase the strength of this effect.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
pressureCoefficient | float | — |
SoftBodySetRayPickablevoid
public static void SoftBodySetRayPickable(Rid body, bool enable);Sets whether the given soft body will be pickable when using object picking.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
enable | bool | — |
SoftBodySetShrinkingFactorvoid
public static void SoftBodySetShrinkingFactor(Rid body, float shrinkingFactor);Sets the shrinking factor of the given soft body.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
shrinkingFactor | float | — |
SoftBodySetSimulationPrecisionvoid
public static void SoftBodySetSimulationPrecision(Rid body, int simulationPrecision);Sets the simulation precision of the given soft body. Increasing this value will improve the resulting simulation, but can affect performance. Use with care.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
simulationPrecision | int | — |
SoftBodySetSpacevoid
public static void SoftBodySetSpace(Rid body, Rid space);Assigns a space to the given soft body (see PhysicsServer3D.SpaceCreate).
| Name | Type | Default |
|---|---|---|
body | Rid | — |
space | Rid | — |
SoftBodySetStatevoid
public static void SoftBodySetState(Rid body, PhysicsServer3D.BodyState state, Variant variant);Sets the given body state for the given body.
Note: Reckfell's default physics implementation does not support PhysicsServer3D.BodyState.LinearVelocity, PhysicsServer3D.BodyState.AngularVelocity, PhysicsServer3D.BodyState.Sleeping, or PhysicsServer3D.BodyState.CanSleep.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
state | PhysicsServer3D.BodyState | — |
variant | Variant | — |
SoftBodySetTotalMassvoid
public static void SoftBodySetTotalMass(Rid body, float totalMass);Sets the total mass for the given soft body.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
totalMass | float | — |
SoftBodySetTransformvoid
public static void SoftBodySetTransform(Rid body, Transform3D transform);Sets the global transform of the given soft body.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
transform | Transform3D | — |
SoftBodyUpdateRenderingServervoid
public static void SoftBodyUpdateRenderingServer(Rid body, PhysicsServer3DRenderingServerHandler renderingServerHandler);Requests that the physics server updates the rendering server with the latest positions of the given soft body's points through the rendering_server_handler interface.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
renderingServerHandler | PhysicsServer3DRenderingServerHandler | — |
SpaceCreateRid
public static Rid SpaceCreate();Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with PhysicsServer3D.AreaSetSpace, or to a body with PhysicsServer3D.BodySetSpace.
RidSpaceGetDirectStatePhysicsDirectSpaceState3D
public static PhysicsDirectSpaceState3D SpaceGetDirectState(Rid space);Returns the state of a space, a PhysicsDirectSpaceState3D. This object can be used to make collision/intersection queries.
| Name | Type | Default |
|---|---|---|
space | Rid | — |
PhysicsDirectSpaceState3DSpaceGetParamfloat
public static float SpaceGetParam(Rid space, PhysicsServer3D.SpaceParameter param);Returns the value of a space parameter.
| Name | Type | Default |
|---|---|---|
space | Rid | — |
param | PhysicsServer3D.SpaceParameter | — |
floatSpaceIsActivebool
public static bool SpaceIsActive(Rid space);Returns whether the space is active.
| Name | Type | Default |
|---|---|---|
space | Rid | — |
boolSpaceSetActivevoid
public static void SpaceSetActive(Rid space, bool active);Marks a space as active. It will not have an effect, unless it is assigned to an area or body.
| Name | Type | Default |
|---|---|---|
space | Rid | — |
active | bool | — |
SpaceSetParamvoid
public static void SpaceSetParam(Rid space, PhysicsServer3D.SpaceParameter param, float value);Sets the value for a space parameter. A list of available parameters is on the PhysicsServer3D.SpaceParameter constants.
| Name | Type | Default |
|---|---|---|
space | Rid | — |
param | PhysicsServer3D.SpaceParameter | — |
value | float | — |
SphereShapeCreateRid
public static Rid SphereShapeCreate();Creates a 3D sphere shape in the physics server, and returns the Rid that identifies it. Use PhysicsServer3D.ShapeSetData to set the sphere's radius.
RidWorldBoundaryShapeCreateRid
public static Rid WorldBoundaryShapeCreate();Creates a 3D world boundary shape in the physics server, and returns the Rid that identifies it. Use PhysicsServer3D.ShapeSetData to set the shape's normal direction and distance properties.
RidPhysicsServer3D.AreaBodyStatus
| Value | Description |
|---|---|
Added = 0 | The value of the first parameter and area callback function receives, when an object enters one of its shapes. |
Removed = 1 | The value of the first parameter and area callback function receives, when an object exits one of its shapes. |
PhysicsServer3D.AreaParameter
| Value | Description |
|---|---|
AngularDamp = 8 | Constant to set/get the angular damping factor of an area. |
AngularDampOverrideMode = 7 | Constant to set/get angular damping override mode in an area. See |
Gravity = 1 | Constant to set/get gravity strength in an area. |
GravityIsPoint = 3 | Constant to set/get whether the gravity vector of an area is a direction, or a center point. |
GravityOverrideMode = 0 | Constant to set/get gravity override mode in an area. See |
GravityPointUnitDistance = 4 | Constant to set/get the distance at which the gravity strength is equal to the gravity controlled by |
GravityVector = 2 | Constant to set/get gravity vector/center in an area. |
LinearDamp = 6 | Constant to set/get the linear damping factor of an area. |
LinearDampOverrideMode = 5 | Constant to set/get linear damping override mode in an area. See |
Priority = 9 | Constant to set/get the priority (order of processing) of an area. |
WindAttenuationFactor = 13 | Constant to set/get the exponential rate at which wind force decreases with distance from its origin. |
WindDirection = 12 | Constant to set/get the 3D vector that specifies the direction in which an area-specific wind blows. |
WindForceMagnitude = 10 | Constant to set/get the magnitude of area-specific wind force. This wind force only applies to |
WindSource = 11 | Constant to set/get the 3D vector that specifies the origin from which an area-specific wind blows. |
PhysicsServer3D.AreaSpaceOverrideMode
| Value | Description |
|---|---|
Combine = 1 | This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. |
CombineReplace = 2 | This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. |
Disabled = 0 | This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. |
Replace = 3 | This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. |
ReplaceCombine = 4 | This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. |
PhysicsServer3D.BodyAxis
PhysicsServer3D.BodyDampMode
| Value | Description |
|---|---|
Combine = 0 | The body's damping value is added to any value set in areas or the default value. |
Replace = 1 | The body's damping value replaces any value set in areas or the default value. |
PhysicsServer3D.BodyMode
| Value | Description |
|---|---|
Kinematic = 1 | Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path. |
Rigid = 2 | Constant for rigid bodies. In this mode, a body can be pushed by other bodies and has forces applied. |
RigidLinear = 3 | Constant for linear rigid bodies. In this mode, a body can not rotate, and only its linear velocity is affected by external forces. |
Static = 0 | Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved. |
PhysicsServer3D.BodyParameter
| Value | Description |
|---|---|
AngularDamp = 9 | Constant to set/get a body's angular damping factor. |
AngularDampMode = 7 | Constant to set/get a body's angular damping mode. See |
Bounce = 0 | Constant to set/get a body's bounce factor. |
CenterOfMass = 4 | Constant to set/get a body's center of mass position in the body's local coordinate system. |
Friction = 1 | Constant to set/get a body's friction. |
GravityScale = 5 | Constant to set/get a body's gravity multiplier. |
Inertia = 3 | Constant to set/get a body's inertia. |
LinearDamp = 8 | Constant to set/get a body's linear damping factor. |
LinearDampMode = 6 | Constant to set/get a body's linear damping mode. See |
Mass = 2 | Constant to set/get a body's mass. |
Max = 10 | Represents the size of the |
PhysicsServer3D.BodyState
| Value | Description |
|---|---|
AngularVelocity = 2 | Constant to set/get the current angular velocity of the body. |
CanSleep = 4 | Constant to set/get whether the body can sleep. |
LinearVelocity = 1 | Constant to set/get the current linear velocity of the body. |
Sleeping = 3 | Constant to sleep/wake up a body, or to get whether it is sleeping. |
Transform = 0 | Constant to set/get the current transform matrix of the body. |
PhysicsServer3D.ConeTwistJointParam
| Value | Description |
|---|---|
Bias = 2 | The speed with which the swing or twist will take place. The higher, the faster. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
Relaxation = 4 | Defines, how fast the swing- and twist-speed-difference on both sides gets synced. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
Softness = 3 | The ease with which the Joint3D twists, if it's too low, it takes more force to twist the joint. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
SwingSpan = 0 | Swing is rotation from side to side, around the axis perpendicular to the twist axis.
The swing span defines, how much rotation will not get corrected along the swing axis.
Could be defined as looseness in the |
TwistSpan = 1 | Twist is the rotation around the twist axis, this value defined how far the joint can twist. Twist is locked if below 0.05. |
PhysicsServer3D.G6DofJointAxisFlag
| Value | Description |
|---|---|
EnableAngularLimit = 1 | If set, rotational motion is possible. |
EnableAngularMotor = 4 | If set, there is a rotational or angular motor across these axes. |
EnableAngularSpring = 2 | |
EnableLinearLimit = 0 | If set, linear motion is possible within the given limits. |
EnableLinearMotor = 5 | If set, there is a linear motor on this axis that targets a specific velocity. |
EnableLinearSpring = 3 | |
EnableMotor = 4 | If set, there is a rotational or angular motor across these axes. |
Max = 6 | Represents the size of the |
PhysicsServer3D.G6DofJointAxisParam
| Value | Description |
|---|---|
AngularDamping = 13 | The amount of rotational damping across the axes. The lower, the more damping occurs. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
AngularDriveTorqueLimit = 23 | The maximum torque the joint can apply around this angular axis.
Used by both the spring drive and the angular motor; supersedes |
AngularErp = 16 | When correcting the crossing of limits in rotation across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
AngularForceLimit = 15 | The maximum amount of force that can occur, when rotating around the axes. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
AngularLimitSoftness = 12 | A factor that gets multiplied onto all rotations across the axes. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
AngularLowerLimit = 10 | The minimum rotation in negative direction to break loose and rotate around the axes. |
AngularMotorForceLimit = 18 | Maximum acceleration for the motor at the axes. |
AngularMotorTargetVelocity = 17 | Target speed for the motor at the axes. |
AngularRestitution = 14 | The amount of rotational restitution across the axes. The lower, the more restitution occurs. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
AngularSpringDamping = 20 | |
AngularSpringEquilibriumPoint = 21 | |
AngularSpringStiffness = 19 | |
AngularUpperLimit = 11 | The minimum rotation in positive direction to break loose and rotate around the axes. |
LinearDamping = 4 | The amount of damping that happens at the linear motion across the axes. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
LinearDriveForceLimit = 22 | The maximum force the joint can apply along this linear axis.
Used by both the spring drive and the linear motor; supersedes |
LinearLimitSoftness = 2 | A factor that gets applied to the movement across the axes. The lower, the slower the movement. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
LinearLowerLimit = 0 | The minimum difference between the pivot points' axes. |
LinearMotorForceLimit = 6 | The maximum force that the linear motor can apply while trying to reach the target velocity. |
LinearMotorTargetVelocity = 5 | The velocity that the joint's linear motor will attempt to reach. |
LinearRestitution = 3 | The amount of restitution on the axes movement. The lower, the more velocity-energy gets lost. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
LinearSpringDamping = 8 | |
LinearSpringEquilibriumPoint = 9 | |
LinearSpringStiffness = 7 | |
LinearUpperLimit = 1 | The maximum difference between the pivot points' axes. |
Max = 24 | Represents the size of the |
PhysicsServer3D.HingeJointFlag
| Value | Description |
|---|---|
EnableMotor = 1 | If |
UseLimit = 0 | If |
PhysicsServer3D.HingeJointParam
| Value | Description |
|---|---|
Bias = 0 | The speed with which the two bodies get pulled together when they move in different directions. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
LimitBias = 3 | The speed with which the rotation across the axis perpendicular to the hinge gets corrected. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
LimitLower = 2 | The minimum rotation across the Hinge. |
LimitRelaxation = 5 | The lower this value, the more the rotation gets slowed down. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
LimitSoftness = 4 | Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
LimitUpper = 1 | The maximum rotation across the Hinge. |
MotorMaxImpulse = 7 | Maximum acceleration for the motor. |
MotorTargetVelocity = 6 | Target speed for the motor. |
PhysicsServer3D.JointType
| Value | Description |
|---|---|
ConeTwist = 3 | The |
Hinge = 1 | The |
Max = 5 | Represents the size of the |
Pin = 0 | The |
Slider = 2 | The |
Type6Dof = 4 | The |
PhysicsServer3D.PinJointParam
| Value | Description |
|---|---|
Bias = 0 | The strength with which the pinned objects try to stay in positional relation to each other. The higher, the stronger. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
Damping = 1 | The strength with which the pinned objects try to stay in velocity relation to each other. The higher, the stronger. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
ImpulseClamp = 2 | If above 0, this value is the maximum value for an impulse that this Joint3D puts on its ends. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
PhysicsServer3D.ProcessInfo
| Value | Description |
|---|---|
ActiveObjects = 0 | Constant to get the number of objects that are not sleeping. |
CollisionPairs = 1 | Constant to get the number of possible collisions. |
IslandCount = 2 | Constant to get the number of space regions where a collision could occur. |
PhysicsServer3D.ShapeType
| Value | Description |
|---|---|
Box = 3 | Constant for creating a box shape (used by the |
Capsule = 4 | Constant for creating a capsule shape (used by the |
ConcavePolygon = 7 | Constant for creating a concave polygon (trimesh) shape (used by the |
ConvexPolygon = 6 | Constant for creating a convex polygon shape (used by the |
Custom = 10 | Constant used internally for a custom shape. Any attempt to create this kind of shape results in an error when using Reckfell Physics or Jolt Physics. |
Cylinder = 5 | Constant for creating a cylinder shape (used by the |
Heightmap = 8 | Constant for creating a heightmap shape (used by the |
SeparationRay = 1 | Constant for creating a separation ray shape (used by the |
SoftBody = 9 | Constant used internally for a soft body shape. Any attempt to create this kind of shape results in an error. |
Sphere = 2 | Constant for creating a sphere shape (used by the |
WorldBoundary = 0 | Constant for creating a world boundary shape (used by the |
PhysicsServer3D.SliderJointParam
| Value | Description |
|---|---|
AngularLimitDamping = 15 | The amount of damping of the rotation when the limit is surpassed. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
AngularLimitLower = 12 | The lower limit of rotation in the slider. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
AngularLimitRestitution = 14 | The amount of restitution of the rotation when the limit is surpassed. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
AngularLimitSoftness = 13 | A factor applied to the all rotation once the limit is surpassed. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
AngularLimitUpper = 11 | The upper limit of rotation in the slider. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
AngularMotionDamping = 18 | The amount of damping of the rotation in the limits. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
AngularMotionRestitution = 17 | The amount of restitution of the rotation in the limits. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
AngularMotionSoftness = 16 | A factor that gets applied to the all rotation in the limits. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
AngularOrthogonalDamping = 21 | The amount of damping of the rotation across axes orthogonal to the slider. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
AngularOrthogonalRestitution = 20 | The amount of restitution of the rotation across axes orthogonal to the slider. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
AngularOrthogonalSoftness = 19 | A factor that gets applied to the all rotation across axes orthogonal to the slider. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
LinearLimitDamping = 4 | The amount of damping once the slider limits are surpassed. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
LinearLimitLower = 1 | The minimum difference between the pivot points on their X axis before damping happens. |
LinearLimitRestitution = 3 | The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
LinearLimitSoftness = 2 | A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
LinearLimitUpper = 0 | The maximum difference between the pivot points on their X axis before damping happens. |
LinearMotionDamping = 7 | The amount of damping inside the slider limits. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
LinearMotionRestitution = 6 | The amount of restitution inside the slider limits. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
LinearMotionSoftness = 5 | A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
LinearOrthogonalDamping = 10 | The amount of damping when movement is across axes orthogonal to the slider. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
LinearOrthogonalRestitution = 9 | The amount of restitution when movement is across axes orthogonal to the slider. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
LinearOrthogonalSoftness = 8 | A factor applied to the movement across axes orthogonal to the slider. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
Max = 22 | Represents the size of the |
PhysicsServer3D.SpaceParameter
| Value | Description |
|---|---|
BodyAngularVelocitySleepThreshold = 5 | Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
BodyLinearVelocitySleepThreshold = 4 | Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. Note: Only supported when using ReckfellPhysics3D. This parameter is ignored when using Jolt Physics. |
BodyTimeToSleep = 6 | Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. |
ContactDefaultBias = 3 | Constant to set/get the default solver bias for all physics contacts. A solver bias is a factor controlling how much two objects "rebound", after overlapping, to avoid leaving them in that state because of numerical imprecision. |
ContactMaxAllowedPenetration = 2 | Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. |
ContactMaxSeparation = 1 | Constant to set/get the maximum distance a shape can be from another before they are considered separated and the contact is discarded. |
ContactRecycleRadius = 0 | Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. |
SolverIterations = 7 | Constant to set/get the number of solver iterations for contacts and constraints. The greater the number of iterations, the more accurate the collisions and constraints will be. However, a greater number of iterations requires more CPU power, which can decrease performance. |