reckfellENGINE

PhysicsServer3D

A server interface for low-level 3D physics access.

On this page
class PhysicsServer3DReckfellSharp

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 PhysicsServer3D may 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
# Singleton
C#
public static PhysicsServer3DInstance Singleton { get; }

Methods177

AreaAddShapevoid
# AreaAddShape
C#
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.

Parameters
NameTypeDefault
areaRid—
shapeRid—
transformTransform3D?default
disabledboolfalse
transform

If the parameter is null, then the default value is Transform3D.Identity.

AreaAttachObjectInstanceIdvoid
# AreaAttachObjectInstanceId
C#
public static void AreaAttachObjectInstanceId(Rid area, ulong id);

Assigns the area to a descendant of ReckfellObject, so it can exist in the node tree.

Parameters
NameTypeDefault
areaRid—
idulong—
AreaClearShapesvoid
# AreaClearShapes
C#
public static void AreaClearShapes(Rid area);

Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later.

Parameters
NameTypeDefault
areaRid—
AreaCreateRid
# AreaCreate
C#
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.

Returns Rid
AreaGetCollisionLayeruint
# AreaGetCollisionLayer
C#
public static uint AreaGetCollisionLayer(Rid area);

Returns the physics layer or layers an area belongs to.

Parameters
NameTypeDefault
areaRid—
Returns uint
AreaGetCollisionMaskuint
# AreaGetCollisionMask
C#
public static uint AreaGetCollisionMask(Rid area);

Returns the physics layer or layers an area can contact with.

Parameters
NameTypeDefault
areaRid—
Returns uint
AreaGetObjectInstanceIdulong
# AreaGetObjectInstanceId
C#
public static ulong AreaGetObjectInstanceId(Rid area);

Gets the instance ID of the object the area is assigned to.

Parameters
NameTypeDefault
areaRid—
Returns ulong
AreaGetParamVariant
# AreaGetParam
C#
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.

Parameters
NameTypeDefault
areaRid—
paramPhysicsServer3D.AreaParameter—
Returns Variant
AreaGetShapeRid
# AreaGetShape
C#
public static Rid AreaGetShape(Rid area, int shapeIdx);

Returns the Rid of the nth shape of an area.

Parameters
NameTypeDefault
areaRid—
shapeIdxint—
Returns Rid
AreaGetShapeCountint
# AreaGetShapeCount
C#
public static int AreaGetShapeCount(Rid area);

Returns the number of shapes assigned to an area.

Parameters
NameTypeDefault
areaRid—
Returns int
AreaGetShapeTransformTransform3D
# AreaGetShapeTransform
C#
public static Transform3D AreaGetShapeTransform(Rid area, int shapeIdx);

Returns the transform matrix of a shape within an area.

Parameters
NameTypeDefault
areaRid—
shapeIdxint—
Returns Transform3D
AreaGetSpaceRid
# AreaGetSpace
C#
public static Rid AreaGetSpace(Rid area);

Returns the space assigned to the area.

Parameters
NameTypeDefault
areaRid—
Returns Rid
AreaGetTransformTransform3D
# AreaGetTransform
C#
public static Transform3D AreaGetTransform(Rid area);

Returns the transform matrix for an area.

Parameters
NameTypeDefault
areaRid—
Returns Transform3D
AreaRemoveShapevoid
# AreaRemoveShape
C#
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.

Parameters
NameTypeDefault
areaRid—
shapeIdxint—
AreaSetAreaMonitorCallbackvoid
# AreaSetAreaMonitorCallback
C#
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:

  1. an integer status: either PhysicsServer3D.AreaBodyStatus.Added or PhysicsServer3D.AreaBodyStatus.Removed depending on whether the other area's shape entered or exited the area,
  2. an Rid area_rid: the Rid of the other area that entered or exited the area,
  3. an integer instance_id: the ObjectID attached to the other area,
  4. an integer area_shape_idx: the index of the shape of the other area that entered or exited the area,
  5. 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.
Parameters
NameTypeDefault
areaRid—
callbackCallable—
AreaSetCollisionLayervoid
# AreaSetCollisionLayer
C#
public static void AreaSetCollisionLayer(Rid area, uint layer);

Assigns the area to one or many physics layers.

Parameters
NameTypeDefault
areaRid—
layeruint—
AreaSetCollisionMaskvoid
# AreaSetCollisionMask
C#
public static void AreaSetCollisionMask(Rid area, uint mask);

Sets which physics layers the area will monitor.

Parameters
NameTypeDefault
areaRid—
maskuint—
AreaSetMonitorCallbackvoid
# AreaSetMonitorCallback
C#
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:

  1. an integer status: either PhysicsServer3D.AreaBodyStatus.Added or PhysicsServer3D.AreaBodyStatus.Removed depending on whether the other body shape entered or exited the area,
  2. an Rid body_rid: the Rid of the body that entered or exited the area,
  3. an integer instance_id: the ObjectID attached to the body,
  4. an integer body_shape_idx: the index of the shape of the body that entered or exited the area,
  5. 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.
Parameters
NameTypeDefault
areaRid—
callbackCallable—
AreaSetMonitorablevoid
# AreaSetMonitorable
C#
public static void AreaSetMonitorable(Rid area, bool monitorable);
Parameters
NameTypeDefault
areaRid—
monitorablebool—
AreaSetParamvoid
# AreaSetParam
C#
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.

Parameters
NameTypeDefault
areaRid—
paramPhysicsServer3D.AreaParameter—
valueVariant—
AreaSetRayPickablevoid
# AreaSetRayPickable
C#
public static void AreaSetRayPickable(Rid area, bool enable);

Sets object pickable with rays.

Parameters
NameTypeDefault
areaRid—
enablebool—
AreaSetShapevoid
# AreaSetShape
C#
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.

Parameters
NameTypeDefault
areaRid—
shapeIdxint—
shapeRid—
AreaSetShapeDisabledvoid
# AreaSetShapeDisabled
C#
public static void AreaSetShapeDisabled(Rid area, int shapeIdx, bool disabled);
Parameters
NameTypeDefault
areaRid—
shapeIdxint—
disabledbool—
AreaSetShapeTransformvoid
# AreaSetShapeTransform
C#
public static void AreaSetShapeTransform(Rid area, int shapeIdx, Transform3D transform);

Sets the transform matrix for an area shape.

Parameters
NameTypeDefault
areaRid—
shapeIdxint—
transformTransform3D—
AreaSetSpacevoid
# AreaSetSpace
C#
public static void AreaSetSpace(Rid area, Rid space);

Assigns a space to the area.

Parameters
NameTypeDefault
areaRid—
spaceRid—
AreaSetTransformvoid
# AreaSetTransform
C#
public static void AreaSetTransform(Rid area, Transform3D transform);

Sets the transform matrix for an area.

Parameters
NameTypeDefault
areaRid—
transformTransform3D—
BodyAddCollisionExceptionvoid
# BodyAddCollisionException
C#
public static void BodyAddCollisionException(Rid body, Rid exceptedBody);

Adds a body to the list of bodies exempt from collisions.

Parameters
NameTypeDefault
bodyRid—
exceptedBodyRid—
BodyAddConstantCentralForcevoid
# BodyAddConstantCentralForce
C#
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.

Parameters
NameTypeDefault
bodyRid—
forceVector3—
BodyAddConstantForcevoid
# BodyAddConstantForce
C#
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.

Parameters
NameTypeDefault
bodyRid—
forceVector3—
positionVector3?default
position

If the parameter is null, then the default value is new Vector3(0.0f, 0.0f, 0.0f).

BodyAddConstantTorquevoid
# BodyAddConstantTorque
C#
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)).

Parameters
NameTypeDefault
bodyRid—
torqueVector3—
BodyAddShapevoid
# BodyAddShape
C#
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.

Parameters
NameTypeDefault
bodyRid—
shapeRid—
transformTransform3D?default
disabledboolfalse
transform

If the parameter is null, then the default value is Transform3D.Identity.

BodyApplyCentralForcevoid
# BodyApplyCentralForce
C#
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.

Parameters
NameTypeDefault
bodyRid—
forceVector3—
BodyApplyCentralImpulsevoid
# BodyApplyCentralImpulse
C#
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.

Parameters
NameTypeDefault
bodyRid—
impulseVector3—
BodyApplyForcevoid
# BodyApplyForce
C#
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.

Parameters
NameTypeDefault
bodyRid—
forceVector3—
positionVector3?default
position

If the parameter is null, then the default value is new Vector3(0.0f, 0.0f, 0.0f).

BodyApplyImpulsevoid
# BodyApplyImpulse
C#
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.

Parameters
NameTypeDefault
bodyRid—
impulseVector3—
positionVector3?default
position

If the parameter is null, then the default value is new Vector3(0.0f, 0.0f, 0.0f).

BodyApplyTorquevoid
# BodyApplyTorque
C#
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.

Parameters
NameTypeDefault
bodyRid—
torqueVector3—
BodyApplyTorqueImpulsevoid
# BodyApplyTorqueImpulse
C#
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).

Parameters
NameTypeDefault
bodyRid—
impulseVector3—
BodyAttachObjectInstanceIdvoid
# BodyAttachObjectInstanceId
C#
public static void BodyAttachObjectInstanceId(Rid body, ulong id);

Assigns the area to a descendant of ReckfellObject, so it can exist in the node tree.

Parameters
NameTypeDefault
bodyRid—
idulong—
BodyClearShapesvoid
# BodyClearShapes
C#
public static void BodyClearShapes(Rid body);

Removes all shapes from a body.

Parameters
NameTypeDefault
bodyRid—
BodyCreateRid
# BodyCreate
C#
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.

Returns Rid
BodyGetCollisionLayeruint
# BodyGetCollisionLayer
C#
public static uint BodyGetCollisionLayer(Rid body);

Returns the physics layer or layers a body belongs to.

Parameters
NameTypeDefault
bodyRid—
Returns uint
BodyGetCollisionMaskuint
# BodyGetCollisionMask
C#
public static uint BodyGetCollisionMask(Rid body);

Returns the physics layer or layers a body can collide with.

Parameters
NameTypeDefault
bodyRid—
Returns uint
BodyGetCollisionPriorityfloat
# BodyGetCollisionPriority
C#
public static float BodyGetCollisionPriority(Rid body);

Returns the body's collision priority.

Parameters
NameTypeDefault
bodyRid—
Returns float
BodyGetConstantForceVector3
# BodyGetConstantForce
C#
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.

Parameters
NameTypeDefault
bodyRid—
Returns Vector3
BodyGetConstantTorqueVector3
# BodyGetConstantTorque
C#
public static Vector3 BodyGetConstantTorque(Rid body);

Returns the body's total constant rotational forces applied during each physics update. See PhysicsServer3D.BodyAddConstantTorque.

Parameters
NameTypeDefault
bodyRid—
Returns Vector3
BodyGetDirectStatePhysicsDirectBodyState3D
# BodyGetDirectState
C#
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.

Parameters
NameTypeDefault
bodyRid—
Returns PhysicsDirectBodyState3D
BodyGetMaxContactsReportedint
# BodyGetMaxContactsReported
C#
public static int BodyGetMaxContactsReported(Rid body);

Returns the maximum contacts that can be reported. See PhysicsServer3D.BodySetMaxContactsReported.

Parameters
NameTypeDefault
bodyRid—
Returns int
BodyGetModePhysicsServer3D.BodyMode
# BodyGetMode
C#
public static PhysicsServer3D.BodyMode BodyGetMode(Rid body);

Returns the body mode.

Parameters
NameTypeDefault
bodyRid—
Returns PhysicsServer3D.BodyMode
BodyGetObjectInstanceIdulong
# BodyGetObjectInstanceId
C#
public static ulong BodyGetObjectInstanceId(Rid body);

Gets the instance ID of the object the area is assigned to.

Parameters
NameTypeDefault
bodyRid—
Returns ulong
BodyGetParamVariant
# BodyGetParam
C#
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.

Parameters
NameTypeDefault
bodyRid—
paramPhysicsServer3D.BodyParameter—
Returns Variant
BodyGetShapeRid
# BodyGetShape
C#
public static Rid BodyGetShape(Rid body, int shapeIdx);

Returns the Rid of the nth shape of a body.

Parameters
NameTypeDefault
bodyRid—
shapeIdxint—
Returns Rid
BodyGetShapeCountint
# BodyGetShapeCount
C#
public static int BodyGetShapeCount(Rid body);

Returns the number of shapes assigned to a body.

Parameters
NameTypeDefault
bodyRid—
Returns int
BodyGetShapeTransformTransform3D
# BodyGetShapeTransform
C#
public static Transform3D BodyGetShapeTransform(Rid body, int shapeIdx);

Returns the transform matrix of a body shape.

Parameters
NameTypeDefault
bodyRid—
shapeIdxint—
Returns Transform3D
BodyGetSpaceRid
# BodyGetSpace
C#
public static Rid BodyGetSpace(Rid body);

Returns the Rid of the space assigned to a body.

Parameters
NameTypeDefault
bodyRid—
Returns Rid
BodyGetStateVariant
# BodyGetState
C#
public static Variant BodyGetState(Rid body, PhysicsServer3D.BodyState state);

Returns a body state.

Parameters
NameTypeDefault
bodyRid—
statePhysicsServer3D.BodyState—
Returns Variant
BodyIsAxisLockedbool
# BodyIsAxisLocked
C#
public static bool BodyIsAxisLocked(Rid body, PhysicsServer3D.BodyAxis axis);
Parameters
NameTypeDefault
bodyRid—
axisPhysicsServer3D.BodyAxis—
Returns bool
BodyIsContinuousCollisionDetectionEnabledbool
# BodyIsContinuousCollisionDetectionEnabled
C#
public static bool BodyIsContinuousCollisionDetectionEnabled(Rid body);

If true, the continuous collision detection mode is enabled.

Parameters
NameTypeDefault
bodyRid—
Returns bool
BodyIsOmittingForceIntegrationbool
# BodyIsOmittingForceIntegration
C#
public static bool BodyIsOmittingForceIntegration(Rid body);

Returns true if the body is omitting the standard force integration. See PhysicsServer3D.BodySetOmitForceIntegration.

Parameters
NameTypeDefault
bodyRid—
Returns bool
BodyRemoveCollisionExceptionvoid
# BodyRemoveCollisionException
C#
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.

Parameters
NameTypeDefault
bodyRid—
exceptedBodyRid—
BodyRemoveShapevoid
# BodyRemoveShape
C#
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.

Parameters
NameTypeDefault
bodyRid—
shapeIdxint—
BodyResetMassPropertiesvoid
# BodyResetMassProperties
C#
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.

Parameters
NameTypeDefault
bodyRid—
BodySetAxisLockvoid
# BodySetAxisLock
C#
public static void BodySetAxisLock(Rid body, PhysicsServer3D.BodyAxis axis, bool @lock);
Parameters
NameTypeDefault
bodyRid—
axisPhysicsServer3D.BodyAxis—
lockbool—
BodySetAxisVelocityvoid
# BodySetAxisVelocity
C#
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.

Parameters
NameTypeDefault
bodyRid—
axisVelocityVector3—
BodySetCollisionLayervoid
# BodySetCollisionLayer
C#
public static void BodySetCollisionLayer(Rid body, uint layer);

Sets the physics layer or layers a body belongs to.

Parameters
NameTypeDefault
bodyRid—
layeruint—
BodySetCollisionMaskvoid
# BodySetCollisionMask
C#
public static void BodySetCollisionMask(Rid body, uint mask);

Sets the physics layer or layers a body can collide with.

Parameters
NameTypeDefault
bodyRid—
maskuint—
BodySetCollisionPriorityvoid
# BodySetCollisionPriority
C#
public static void BodySetCollisionPriority(Rid body, float priority);

Sets the body's collision priority.

Parameters
NameTypeDefault
bodyRid—
priorityfloat—
BodySetConstantForcevoid
# BodySetConstantForce
C#
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.

Parameters
NameTypeDefault
bodyRid—
forceVector3—
BodySetConstantTorquevoid
# BodySetConstantTorque
C#
public static void BodySetConstantTorque(Rid body, Vector3 torque);

Sets the body's total constant rotational forces applied during each physics update. See PhysicsServer3D.BodyAddConstantTorque.

Parameters
NameTypeDefault
bodyRid—
torqueVector3—
BodySetEnableContinuousCollisionDetectionvoid
# BodySetEnableContinuousCollisionDetection
C#
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.

Parameters
NameTypeDefault
bodyRid—
enablebool—
BodySetForceIntegrationCallbackvoid
# BodySetForceIntegrationCallback
C#
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:

  1. state: a PhysicsDirectBodyState3D, used to retrieve and modify the body's state,
  2. Variant; its value will be the userdata passed into this method. If userdata is null, then callable must take only the state parameter.
Parameters
NameTypeDefault
bodyRid—
callableCallable—
userdataVariantdefault
BodySetMaxContactsReportedvoid
# BodySetMaxContactsReported
C#
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.

Parameters
NameTypeDefault
bodyRid—
amountint—
BodySetModevoid
# BodySetMode
C#
public static void BodySetMode(Rid body, PhysicsServer3D.BodyMode mode);

Sets the body mode.

Parameters
NameTypeDefault
bodyRid—
modePhysicsServer3D.BodyMode—
BodySetOmitForceIntegrationvoid
# BodySetOmitForceIntegration
C#
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.

Parameters
NameTypeDefault
bodyRid—
enablebool—
BodySetParamvoid
# BodySetParam
C#
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.

Parameters
NameTypeDefault
bodyRid—
paramPhysicsServer3D.BodyParameter—
valueVariant—
BodySetRayPickablevoid
# BodySetRayPickable
C#
public static void BodySetRayPickable(Rid body, bool enable);

Sets the body pickable with rays if enable is set.

Parameters
NameTypeDefault
bodyRid—
enablebool—
BodySetShapevoid
# BodySetShape
C#
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.

Parameters
NameTypeDefault
bodyRid—
shapeIdxint—
shapeRid—
BodySetShapeDisabledvoid
# BodySetShapeDisabled
C#
public static void BodySetShapeDisabled(Rid body, int shapeIdx, bool disabled);
Parameters
NameTypeDefault
bodyRid—
shapeIdxint—
disabledbool—
BodySetShapeTransformvoid
# BodySetShapeTransform
C#
public static void BodySetShapeTransform(Rid body, int shapeIdx, Transform3D transform);

Sets the transform matrix for a body shape.

Parameters
NameTypeDefault
bodyRid—
shapeIdxint—
transformTransform3D—
BodySetSpacevoid
# BodySetSpace
C#
public static void BodySetSpace(Rid body, Rid space);

Assigns a space to the body (see PhysicsServer3D.SpaceCreate).

Parameters
NameTypeDefault
bodyRid—
spaceRid—
BodySetStatevoid
# BodySetState
C#
public static void BodySetState(Rid body, PhysicsServer3D.BodyState state, Variant value);

Sets a body state.

Parameters
NameTypeDefault
bodyRid—
statePhysicsServer3D.BodyState—
valueVariant—
BodySetStateSyncCallbackvoid
# BodySetStateSyncCallback
C#
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:

  1. state: a PhysicsDirectBodyState3D, used to retrieve the body's state.
Parameters
NameTypeDefault
bodyRid—
callableCallable—
BodyTestMotionbool
# BodyTestMotion
C#
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.

Parameters
NameTypeDefault
bodyRid—
parametersPhysicsTestMotionParameters3D—
resultPhysicsTestMotionResult3Dnull
Returns bool
BoxShapeCreateRid
# BoxShapeCreate
C#
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.

Returns Rid
CapsuleShapeCreateRid
# CapsuleShapeCreate
C#
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.

Returns Rid
ConcavePolygonShapeCreateRid
# ConcavePolygonShapeCreate
C#
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.

Returns Rid
ConeTwistJointGetParamfloat
# ConeTwistJointGetParam
C#
public static float ConeTwistJointGetParam(Rid joint, PhysicsServer3D.ConeTwistJointParam param);

Gets a cone twist joint parameter.

Parameters
NameTypeDefault
jointRid—
paramPhysicsServer3D.ConeTwistJointParam—
Returns float
ConeTwistJointSetParamvoid
# ConeTwistJointSetParam
C#
public static void ConeTwistJointSetParam(Rid joint, PhysicsServer3D.ConeTwistJointParam param, float value);

Sets a cone twist joint parameter.

Parameters
NameTypeDefault
jointRid—
paramPhysicsServer3D.ConeTwistJointParam—
valuefloat—
ConvexPolygonShapeCreateRid
# ConvexPolygonShapeCreate
C#
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.

Returns Rid
CustomShapeCreateRid
# CustomShapeCreate
C#
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.

Returns Rid
CylinderShapeCreateRid
# CylinderShapeCreate
C#
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.

Returns Rid
FreeRidvoid
# FreeRid
C#
public static void FreeRid(Rid rid);

Destroys any of the objects created by PhysicsServer3D. If the Rid passed is not one of the objects that can be created by PhysicsServer3D, an error will be sent to the console.

Parameters
NameTypeDefault
ridRid—
Generic6DofJointGetAngularTargetRotationQuaternion
# Generic6DofJointGetAngularTargetRotation
C#
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.

Parameters
NameTypeDefault
jointRid—
Returns Quaternion
Generic6DofJointGetFlagbool
# Generic6DofJointGetFlag
C#
public static bool Generic6DofJointGetFlag(Rid joint, Vector3.Axis axis, PhysicsServer3D.G6DofJointAxisFlag flag);

Returns the value of a generic 6DOF joint flag.

Parameters
NameTypeDefault
jointRid—
axisVector3.Axis—
flagPhysicsServer3D.G6DofJointAxisFlag—
Returns bool
Generic6DofJointGetParamfloat
# Generic6DofJointGetParam
C#
public static float Generic6DofJointGetParam(Rid joint, Vector3.Axis axis, PhysicsServer3D.G6DofJointAxisParam param);

Returns the value of a generic 6DOF joint parameter.

Parameters
NameTypeDefault
jointRid—
axisVector3.Axis—
paramPhysicsServer3D.G6DofJointAxisParam—
Returns float
Generic6DofJointSetAngularTargetRotationvoid
# Generic6DofJointSetAngularTargetRotation
C#
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.

Parameters
NameTypeDefault
jointRid—
targetRotationQuaternion—
Generic6DofJointSetFlagvoid
# Generic6DofJointSetFlag
C#
public static void Generic6DofJointSetFlag(Rid joint, Vector3.Axis axis, PhysicsServer3D.G6DofJointAxisFlag flag, bool enable);

Sets the value of a given generic 6DOF joint flag.

Parameters
NameTypeDefault
jointRid—
axisVector3.Axis—
flagPhysicsServer3D.G6DofJointAxisFlag—
enablebool—
Generic6DofJointSetParamvoid
# Generic6DofJointSetParam
C#
public static void Generic6DofJointSetParam(Rid joint, Vector3.Axis axis, PhysicsServer3D.G6DofJointAxisParam param, float value);

Sets the value of a given generic 6DOF joint parameter.

Parameters
NameTypeDefault
jointRid—
axisVector3.Axis—
paramPhysicsServer3D.G6DofJointAxisParam—
valuefloat—
GetProcessInfoint
# GetProcessInfo
C#
public static int GetProcessInfo(PhysicsServer3D.ProcessInfo processInfo);

Returns the value of a physics engine state specified by process_info.

Parameters
NameTypeDefault
processInfoPhysicsServer3D.ProcessInfo—
Returns int
HeightmapShapeCreateRid
# HeightmapShapeCreate
C#
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.

Returns Rid
HingeJointGetFlagbool
# HingeJointGetFlag
C#
public static bool HingeJointGetFlag(Rid joint, PhysicsServer3D.HingeJointFlag flag);

Gets a hinge joint flag.

Parameters
NameTypeDefault
jointRid—
flagPhysicsServer3D.HingeJointFlag—
Returns bool
HingeJointGetParamfloat
# HingeJointGetParam
C#
public static float HingeJointGetParam(Rid joint, PhysicsServer3D.HingeJointParam param);

Gets a hinge joint parameter.

Parameters
NameTypeDefault
jointRid—
paramPhysicsServer3D.HingeJointParam—
Returns float
HingeJointSetFlagvoid
# HingeJointSetFlag
C#
public static void HingeJointSetFlag(Rid joint, PhysicsServer3D.HingeJointFlag flag, bool enabled);

Sets a hinge joint flag.

Parameters
NameTypeDefault
jointRid—
flagPhysicsServer3D.HingeJointFlag—
enabledbool—
HingeJointSetParamvoid
# HingeJointSetParam
C#
public static void HingeJointSetParam(Rid joint, PhysicsServer3D.HingeJointParam param, float value);

Sets a hinge joint parameter.

Parameters
NameTypeDefault
jointRid—
paramPhysicsServer3D.HingeJointParam—
valuefloat—
JointClearvoid
# JointClear
C#
public static void JointClear(Rid joint);
Parameters
NameTypeDefault
jointRid—
JointCreateRid
# JointCreate
C#
public static Rid JointCreate();
Returns Rid
JointDisableCollisionsBetweenBodiesvoid
# JointDisableCollisionsBetweenBodies
C#
public static void JointDisableCollisionsBetweenBodies(Rid joint, bool disable);

Sets whether the bodies attached to the Joint3D will collide with each other.

Parameters
NameTypeDefault
jointRid—
disablebool—
JointGetSolverPriorityint
# JointGetSolverPriority
C#
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.

Parameters
NameTypeDefault
jointRid—
Returns int
JointGetTypePhysicsServer3D.JointType
# JointGetType
C#
public static PhysicsServer3D.JointType JointGetType(Rid joint);

Returns the type of the Joint3D.

Parameters
NameTypeDefault
jointRid—
Returns PhysicsServer3D.JointType
JointIsDisabledCollisionsBetweenBodiesbool
# JointIsDisabledCollisionsBetweenBodies
C#
public static bool JointIsDisabledCollisionsBetweenBodies(Rid joint);

Returns whether the bodies attached to the Joint3D will collide with each other.

Parameters
NameTypeDefault
jointRid—
Returns bool
JointMakeConeTwistvoid
# JointMakeConeTwist
C#
public static void JointMakeConeTwist(Rid joint, Rid bodyA, Transform3D localRefA, Rid bodyB, Transform3D localRefB);
Parameters
NameTypeDefault
jointRid—
bodyARid—
localRefATransform3D—
bodyBRid—
localRefBTransform3D—
JointMakeGeneric6Dofvoid
# JointMakeGeneric6Dof
C#
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.

Parameters
NameTypeDefault
jointRid—
bodyARid—
localRefATransform3D—
bodyBRid—
localRefBTransform3D—
JointMakeHingevoid
# JointMakeHinge
C#
public static void JointMakeHinge(Rid joint, Rid bodyA, Transform3D hingeA, Rid bodyB, Transform3D hingeB);
Parameters
NameTypeDefault
jointRid—
bodyARid—
hingeATransform3D—
bodyBRid—
hingeBTransform3D—
JointMakePinvoid
# JointMakePin
C#
public static void JointMakePin(Rid joint, Rid bodyA, Vector3 localA, Rid bodyB, Vector3 localB);
Parameters
NameTypeDefault
jointRid—
bodyARid—
localAVector3—
bodyBRid—
localBVector3—
JointMakeSlidervoid
# JointMakeSlider
C#
public static void JointMakeSlider(Rid joint, Rid bodyA, Transform3D localRefA, Rid bodyB, Transform3D localRefB);
Parameters
NameTypeDefault
jointRid—
bodyARid—
localRefATransform3D—
bodyBRid—
localRefBTransform3D—
JointSetSolverPriorityvoid
# JointSetSolverPriority
C#
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.

Parameters
NameTypeDefault
jointRid—
priorityint—
PinJointGetLocalAVector3
# PinJointGetLocalA
C#
public static Vector3 PinJointGetLocalA(Rid joint);

Returns position of the joint in the local space of body a of the joint.

Parameters
NameTypeDefault
jointRid—
Returns Vector3
PinJointGetLocalBVector3
# PinJointGetLocalB
C#
public static Vector3 PinJointGetLocalB(Rid joint);

Returns position of the joint in the local space of body b of the joint.

Parameters
NameTypeDefault
jointRid—
Returns Vector3
PinJointGetParamfloat
# PinJointGetParam
C#
public static float PinJointGetParam(Rid joint, PhysicsServer3D.PinJointParam param);

Gets a pin joint parameter.

Parameters
NameTypeDefault
jointRid—
paramPhysicsServer3D.PinJointParam—
Returns float
PinJointSetLocalAvoid
# PinJointSetLocalA
C#
public static void PinJointSetLocalA(Rid joint, Vector3 localA);

Sets position of the joint in the local space of body a of the joint.

Parameters
NameTypeDefault
jointRid—
localAVector3—
PinJointSetLocalBvoid
# PinJointSetLocalB
C#
public static void PinJointSetLocalB(Rid joint, Vector3 localB);

Sets position of the joint in the local space of body b of the joint.

Parameters
NameTypeDefault
jointRid—
localBVector3—
PinJointSetParamvoid
# PinJointSetParam
C#
public static void PinJointSetParam(Rid joint, PhysicsServer3D.PinJointParam param, float value);

Sets a pin joint parameter.

Parameters
NameTypeDefault
jointRid—
paramPhysicsServer3D.PinJointParam—
valuefloat—
SeparationRayShapeCreateRid
# SeparationRayShapeCreate
C#
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.

Returns Rid
SetActivevoid
# SetActive
C#
public static void SetActive(bool active);

Activates or deactivates the 3D physics engine.

Parameters
NameTypeDefault
activebool—
ShapeGetDataVariant
# ShapeGetData
C#
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.

Parameters
NameTypeDefault
shapeRid—
Returns Variant
ShapeGetMarginfloat
# ShapeGetMargin
C#
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.

Parameters
NameTypeDefault
shapeRid—
Returns float
ShapeGetTypePhysicsServer3D.ShapeType
# ShapeGetType
C#
public static PhysicsServer3D.ShapeType ShapeGetType(Rid shape);

Returns the shape's type.

Parameters
NameTypeDefault
shapeRid—
Returns PhysicsServer3D.ShapeType
ShapeSetDatavoid
# ShapeSetData
C#
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):

Parameters
NameTypeDefault
shapeRid—
dataVariant—
ShapeSetMarginvoid
# ShapeSetMargin
C#
public static void ShapeSetMargin(Rid shape, float margin);

Sets the collision margin for the shape. Note: This is not used in Reckfell Physics.

Parameters
NameTypeDefault
shapeRid—
marginfloat—
SliderJointGetParamfloat
# SliderJointGetParam
C#
public static float SliderJointGetParam(Rid joint, PhysicsServer3D.SliderJointParam param);

Gets a slider joint parameter.

Parameters
NameTypeDefault
jointRid—
paramPhysicsServer3D.SliderJointParam—
Returns float
SliderJointSetParamvoid
# SliderJointSetParam
C#
public static void SliderJointSetParam(Rid joint, PhysicsServer3D.SliderJointParam param, float value);

Gets a slider joint parameter.

Parameters
NameTypeDefault
jointRid—
paramPhysicsServer3D.SliderJointParam—
valuefloat—
SoftBodyAddCollisionExceptionvoid
# SoftBodyAddCollisionException
C#
public static void SoftBodyAddCollisionException(Rid body, Rid bodyB);

Adds the given body to the list of bodies exempt from collisions.

Parameters
NameTypeDefault
bodyRid—
bodyBRid—
SoftBodyApplyCentralForcevoid
# SoftBodyApplyCentralForce
C#
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.

Parameters
NameTypeDefault
bodyRid—
forceVector3—
SoftBodyApplyCentralImpulsevoid
# SoftBodyApplyCentralImpulse
C#
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).

Parameters
NameTypeDefault
bodyRid—
impulseVector3—
SoftBodyApplyPointForcevoid
# SoftBodyApplyPointForce
C#
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.

Parameters
NameTypeDefault
bodyRid—
pointIndexint—
forceVector3—
SoftBodyApplyPointImpulsevoid
# SoftBodyApplyPointImpulse
C#
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).

Parameters
NameTypeDefault
bodyRid—
pointIndexint—
impulseVector3—
SoftBodyCreateRid
# SoftBodyCreate
C#
public static Rid SoftBodyCreate();

Creates a new soft body and returns its internal Rid.

Returns Rid
SoftBodyGetBoundsAabb
# SoftBodyGetBounds
C#
public static Aabb SoftBodyGetBounds(Rid body);

Returns the bounds of the given soft body in global coordinates.

Parameters
NameTypeDefault
bodyRid—
Returns Aabb
SoftBodyGetCollisionLayeruint
# SoftBodyGetCollisionLayer
C#
public static uint SoftBodyGetCollisionLayer(Rid body);

Returns the physics layer or layers that the given soft body belongs to.

Parameters
NameTypeDefault
bodyRid—
Returns uint
SoftBodyGetCollisionMaskuint
# SoftBodyGetCollisionMask
C#
public static uint SoftBodyGetCollisionMask(Rid body);

Returns the physics layer or layers that the given soft body can collide with.

Parameters
NameTypeDefault
bodyRid—
Returns uint
SoftBodyGetDampingCoefficientfloat
# SoftBodyGetDampingCoefficient
C#
public static float SoftBodyGetDampingCoefficient(Rid body);

Returns the damping coefficient of the given soft body.

Parameters
NameTypeDefault
bodyRid—
Returns float
SoftBodyGetDragCoefficientfloat
# SoftBodyGetDragCoefficient
C#
public static float SoftBodyGetDragCoefficient(Rid body);

Returns the drag coefficient of the given soft body.

Parameters
NameTypeDefault
bodyRid—
Returns float
SoftBodyGetLinearStiffnessfloat
# SoftBodyGetLinearStiffness
C#
public static float SoftBodyGetLinearStiffness(Rid body);

Returns the linear stiffness of the given soft body.

Parameters
NameTypeDefault
bodyRid—
Returns float
SoftBodyGetPointGlobalPositionVector3
# SoftBodyGetPointGlobalPosition
C#
public static Vector3 SoftBodyGetPointGlobalPosition(Rid body, int pointIndex);

Returns the current position of the given soft body point in global coordinates.

Parameters
NameTypeDefault
bodyRid—
pointIndexint—
Returns Vector3
SoftBodyGetPressureCoefficientfloat
# SoftBodyGetPressureCoefficient
C#
public static float SoftBodyGetPressureCoefficient(Rid body);

Returns the pressure coefficient of the given soft body.

Parameters
NameTypeDefault
bodyRid—
Returns float
SoftBodyGetShrinkingFactorfloat
# SoftBodyGetShrinkingFactor
C#
public static float SoftBodyGetShrinkingFactor(Rid body);

Returns the shrinking factor of the given soft body.

Parameters
NameTypeDefault
bodyRid—
Returns float
SoftBodyGetSimulationPrecisionint
# SoftBodyGetSimulationPrecision
C#
public static int SoftBodyGetSimulationPrecision(Rid body);

Returns the simulation precision of the given soft body.

Parameters
NameTypeDefault
bodyRid—
Returns int
SoftBodyGetSpaceRid
# SoftBodyGetSpace
C#
public static Rid SoftBodyGetSpace(Rid body);

Returns the Rid of the space assigned to the given soft body.

Parameters
NameTypeDefault
bodyRid—
Returns Rid
SoftBodyGetStateVariant
# SoftBodyGetState
C#
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.

Parameters
NameTypeDefault
bodyRid—
statePhysicsServer3D.BodyState—
Returns Variant
SoftBodyGetTotalMassfloat
# SoftBodyGetTotalMass
C#
public static float SoftBodyGetTotalMass(Rid body);

Returns the total mass assigned to the given soft body.

Parameters
NameTypeDefault
bodyRid—
Returns float
SoftBodyIsPointPinnedbool
# SoftBodyIsPointPinned
C#
public static bool SoftBodyIsPointPinned(Rid body, int pointIndex);

Returns whether the given soft body point is pinned.

Parameters
NameTypeDefault
bodyRid—
pointIndexint—
Returns bool
SoftBodyMovePointvoid
# SoftBodyMovePoint
C#
public static void SoftBodyMovePoint(Rid body, int pointIndex, Vector3 globalPosition);

Moves the given soft body point to a position in global coordinates.

Parameters
NameTypeDefault
bodyRid—
pointIndexint—
globalPositionVector3—
SoftBodyPinPointvoid
# SoftBodyPinPoint
C#
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.

Parameters
NameTypeDefault
bodyRid—
pointIndexint—
pinbool—
SoftBodyRemoveAllPinnedPointsvoid
# SoftBodyRemoveAllPinnedPoints
C#
public static void SoftBodyRemoveAllPinnedPoints(Rid body);

Unpins all points of the given soft body.

Parameters
NameTypeDefault
bodyRid—
SoftBodyRemoveCollisionExceptionvoid
# SoftBodyRemoveCollisionException
C#
public static void SoftBodyRemoveCollisionException(Rid body, Rid bodyB);

Removes the given body from the list of bodies exempt from collisions.

Parameters
NameTypeDefault
bodyRid—
bodyBRid—
SoftBodySetCollisionLayervoid
# SoftBodySetCollisionLayer
C#
public static void SoftBodySetCollisionLayer(Rid body, uint layer);

Sets the physics layer or layers the given soft body belongs to.

Parameters
NameTypeDefault
bodyRid—
layeruint—
SoftBodySetCollisionMaskvoid
# SoftBodySetCollisionMask
C#
public static void SoftBodySetCollisionMask(Rid body, uint mask);

Sets the physics layer or layers the given soft body can collide with.

Parameters
NameTypeDefault
bodyRid—
maskuint—
SoftBodySetDampingCoefficientvoid
# SoftBodySetDampingCoefficient
C#
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.

Parameters
NameTypeDefault
bodyRid—
dampingCoefficientfloat—
SoftBodySetDragCoefficientvoid
# SoftBodySetDragCoefficient
C#
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.

Parameters
NameTypeDefault
bodyRid—
dragCoefficientfloat—
SoftBodySetLinearStiffnessvoid
# SoftBodySetLinearStiffness
C#
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).

Parameters
NameTypeDefault
bodyRid—
stiffnessfloat—
SoftBodySetMeshvoid
# SoftBodySetMesh
C#
public static void SoftBodySetMesh(Rid body, Rid mesh);

Sets the mesh of the given soft body.

Parameters
NameTypeDefault
bodyRid—
meshRid—
SoftBodySetPressureCoefficientvoid
# SoftBodySetPressureCoefficient
C#
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.

Parameters
NameTypeDefault
bodyRid—
pressureCoefficientfloat—
SoftBodySetRayPickablevoid
# SoftBodySetRayPickable
C#
public static void SoftBodySetRayPickable(Rid body, bool enable);

Sets whether the given soft body will be pickable when using object picking.

Parameters
NameTypeDefault
bodyRid—
enablebool—
SoftBodySetShrinkingFactorvoid
# SoftBodySetShrinkingFactor
C#
public static void SoftBodySetShrinkingFactor(Rid body, float shrinkingFactor);

Sets the shrinking factor of the given soft body.

Parameters
NameTypeDefault
bodyRid—
shrinkingFactorfloat—
SoftBodySetSimulationPrecisionvoid
# SoftBodySetSimulationPrecision
C#
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.

Parameters
NameTypeDefault
bodyRid—
simulationPrecisionint—
SoftBodySetSpacevoid
# SoftBodySetSpace
C#
public static void SoftBodySetSpace(Rid body, Rid space);

Assigns a space to the given soft body (see PhysicsServer3D.SpaceCreate).

Parameters
NameTypeDefault
bodyRid—
spaceRid—
SoftBodySetStatevoid
# SoftBodySetState
C#
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.

Parameters
NameTypeDefault
bodyRid—
statePhysicsServer3D.BodyState—
variantVariant—
SoftBodySetTotalMassvoid
# SoftBodySetTotalMass
C#
public static void SoftBodySetTotalMass(Rid body, float totalMass);

Sets the total mass for the given soft body.

Parameters
NameTypeDefault
bodyRid—
totalMassfloat—
SoftBodySetTransformvoid
# SoftBodySetTransform
C#
public static void SoftBodySetTransform(Rid body, Transform3D transform);

Sets the global transform of the given soft body.

Parameters
NameTypeDefault
bodyRid—
transformTransform3D—
SoftBodyUpdateRenderingServervoid
# SoftBodyUpdateRenderingServer
C#
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.

Parameters
NameTypeDefault
bodyRid—
renderingServerHandlerPhysicsServer3DRenderingServerHandler—
SpaceCreateRid
# SpaceCreate
C#
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.

Returns Rid
SpaceGetDirectStatePhysicsDirectSpaceState3D
# SpaceGetDirectState
C#
public static PhysicsDirectSpaceState3D SpaceGetDirectState(Rid space);

Returns the state of a space, a PhysicsDirectSpaceState3D. This object can be used to make collision/intersection queries.

Parameters
NameTypeDefault
spaceRid—
Returns PhysicsDirectSpaceState3D
SpaceGetParamfloat
# SpaceGetParam
C#
public static float SpaceGetParam(Rid space, PhysicsServer3D.SpaceParameter param);

Returns the value of a space parameter.

Parameters
NameTypeDefault
spaceRid—
paramPhysicsServer3D.SpaceParameter—
Returns float
SpaceIsActivebool
# SpaceIsActive
C#
public static bool SpaceIsActive(Rid space);

Returns whether the space is active.

Parameters
NameTypeDefault
spaceRid—
Returns bool
SpaceSetActivevoid
# SpaceSetActive
C#
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.

Parameters
NameTypeDefault
spaceRid—
activebool—
SpaceSetParamvoid
# SpaceSetParam
C#
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.

Parameters
NameTypeDefault
spaceRid—
paramPhysicsServer3D.SpaceParameter—
valuefloat—
SphereShapeCreateRid
# SphereShapeCreate
C#
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.

Returns Rid
WorldBoundaryShapeCreateRid
# WorldBoundaryShapeCreate
C#
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.

Returns Rid

PhysicsServer3D.AreaBodyStatus

ValueDescription
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

ValueDescription
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 PhysicsServer3D.AreaSpaceOverrideMode for possible values.

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 PhysicsServer3D.AreaSpaceOverrideMode for possible values.

GravityPointUnitDistance = 4

Constant to set/get the distance at which the gravity strength is equal to the gravity controlled by PhysicsServer3D.AreaParameter.Gravity. For example, on a planet 100 meters in radius with a surface gravity of 4.0 m/s², set the gravity to 4.0 and the unit distance to 100.0. The gravity will have falloff according to the inverse square law, so in the example, at 200 meters from the center the gravity will be 1.0 m/s² (twice the distance, 1/4th the gravity), at 50 meters it will be 16.0 m/s² (half the distance, 4× the gravity), and so on. The above is true only when the unit distance is a positive number. When this is set to 0.0, the gravity will be constant regardless of distance.

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 PhysicsServer3D.AreaSpaceOverrideMode for possible values.

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 SoftBody3D nodes. Other physics bodies are currently not affected by wind.

WindSource = 11

Constant to set/get the 3D vector that specifies the origin from which an area-specific wind blows.

PhysicsServer3D.AreaSpaceOverrideMode

ValueDescription
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

ValueDescription
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

ValueDescription
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

ValueDescription
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 PhysicsServer3D.BodyDampMode for possible values.

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 PhysicsServer3D.BodyDampMode for possible values.

Mass = 2

Constant to set/get a body's mass.

Max = 10

Represents the size of the PhysicsServer3D.BodyParameter enum.

PhysicsServer3D.BodyState

ValueDescription
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

ValueDescription
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 ConeTwistJoint3D. If below 0.05, this behavior is locked.

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

ValueDescription
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.G6DofJointAxisFlag enum.

PhysicsServer3D.G6DofJointAxisParam

ValueDescription
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 PhysicsServer3D.G6DofJointAxisParam.AngularMotorForceLimit when set. Note: Only for Jolt backend. Other 3D physics backends may ignore this value.

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 PhysicsServer3D.G6DofJointAxisParam.LinearMotorForceLimit when set. Note: Only for Jolt backend. Other 3D physics backends may ignore this value.

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.G6DofJointAxisParam enum.

PhysicsServer3D.HingeJointFlag

ValueDescription
EnableMotor = 1

If true, a motor turns the Hinge.

UseLimit = 0

If true, the Hinge has a maximum and a minimum rotation.

PhysicsServer3D.HingeJointParam

ValueDescription
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

PhysicsServer3D.PinJointParam

ValueDescription
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

ValueDescription
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

ValueDescription
Box = 3

Constant for creating a box shape (used by the BoxShape3D resource).

Capsule = 4

Constant for creating a capsule shape (used by the CapsuleShape3D resource).

ConcavePolygon = 7

Constant for creating a concave polygon (trimesh) shape (used by the ConcavePolygonShape3D resource).

ConvexPolygon = 6

Constant for creating a convex polygon shape (used by the ConvexPolygonShape3D resource).

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 CylinderShape3D resource).

Heightmap = 8

Constant for creating a heightmap shape (used by the HeightMapShape3D resource).

SeparationRay = 1

Constant for creating a separation ray shape (used by the SeparationRayShape3D resource).

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 SphereShape3D resource).

WorldBoundary = 0

Constant for creating a world boundary shape (used by the WorldBoundaryShape3D resource).

PhysicsServer3D.SliderJointParam

ValueDescription
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.SliderJointParam enum.

PhysicsServer3D.SpaceParameter

ValueDescription
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.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.