reckfellENGINE

PhysicsTestMotionParameters3D

Provides parameters for PhysicsServer3D.body_test_motion.

On this page
class PhysicsTestMotionParameters3DReckfellSharpInherits RefCounted

Provides parameters for PhysicsServer3D.BodyTestMotion.

By changing various properties of this object, such as the motion, you can configure the parameters for PhysicsServer3D.BodyTestMotion.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

PhysicsTestMotionParameters3DConstructor
# PhysicsTestMotionParameters3D
C#
public PhysicsTestMotionParameters3D();

Properties8

CollideSeparationRayProperty
# CollideSeparationRay
C#
public bool CollideSeparationRay { get; set; }

If set to true, shapes of type PhysicsServer3D.ShapeType.SeparationRay are used to detect collisions and can stop the motion. Can be useful when snapping to the ground. If set to false, shapes of type PhysicsServer3D.ShapeType.SeparationRay are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes.

ExcludeBodiesProperty
# ExcludeBodies
C#
public Reckfell.Collections.Array<Rid> ExcludeBodies { get; set; }

Optional array of body Rid to exclude from collision. Use CollisionObject3D.GetRid to get the Rid associated with a CollisionObject3D-derived node.

ExcludeObjectsProperty
# ExcludeObjects
C#
public Reckfell.Collections.Array<int> ExcludeObjects { get; set; }

Optional array of object unique instance ID to exclude from collision. See ReckfellObject.GetInstanceId.

FromProperty
# From
C#
public Transform3D From { get; set; }

Transform in global space where the motion should start. Usually set to Entity3D.GlobalTransform for the current body's transform.

MarginProperty
# Margin
C#
public float Margin { get; set; }

Increases the size of the shapes involved in the collision detection.

MaxCollisionsProperty
# MaxCollisions
C#
public int MaxCollisions { get; set; }

Maximum number of returned collisions, between 1 and 32. Always returns the deepest detected collisions.

MotionProperty
# Motion
C#
public Vector3 Motion { get; set; }

Motion vector to define the length and direction of the motion to test.

RecoveryAsCollisionProperty
# RecoveryAsCollision
C#
public bool RecoveryAsCollision { get; set; }

If set to true, any depenetration from the recovery phase is reported as a collision; this is used e.g. by CharacterBody3D for improving floor detection during floor snapping. If set to false, only collisions resulting from the motion are reported, which is generally the desired behavior.

Methods16

GetExcludeBodiesReckfell.Collections.Array<Rid>
# GetExcludeBodies
C#
public Reckfell.Collections.Array<Rid> GetExcludeBodies();
Returns Reckfell.Collections.Array<Rid>
GetExcludeObjectsReckfell.Collections.Array<int>
# GetExcludeObjects
C#
public Reckfell.Collections.Array<int> GetExcludeObjects();
Returns Reckfell.Collections.Array<int>
GetFromTransform3D
# GetFrom
C#
public Transform3D GetFrom();
Returns Transform3D
GetMarginfloat
# GetMargin
C#
public float GetMargin();
Returns float
GetMaxCollisionsint
# GetMaxCollisions
C#
public int GetMaxCollisions();
Returns int
GetMotionVector3
# GetMotion
C#
public Vector3 GetMotion();
Returns Vector3
IsCollideSeparationRayEnabledbool
# IsCollideSeparationRayEnabled
C#
public bool IsCollideSeparationRayEnabled();
Returns bool
IsRecoveryAsCollisionEnabledbool
# IsRecoveryAsCollisionEnabled
C#
public bool IsRecoveryAsCollisionEnabled();
Returns bool
SetCollideSeparationRayEnabledvoid
# SetCollideSeparationRayEnabled
C#
public void SetCollideSeparationRayEnabled(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetExcludeBodiesvoid
# SetExcludeBodies
C#
public void SetExcludeBodies(Reckfell.Collections.Array<Rid> excludeList);
Parameters
NameTypeDefault
excludeListReckfell.Collections.Array<Rid>—
SetExcludeObjectsvoid
# SetExcludeObjects
C#
public void SetExcludeObjects(Reckfell.Collections.Array<int> excludeList);
Parameters
NameTypeDefault
excludeListReckfell.Collections.Array<int>—
SetFromvoid
# SetFrom
C#
public void SetFrom(Transform3D from);
Parameters
NameTypeDefault
fromTransform3D—
SetMarginvoid
# SetMargin
C#
public void SetMargin(float margin);
Parameters
NameTypeDefault
marginfloat—
SetMaxCollisionsvoid
# SetMaxCollisions
C#
public void SetMaxCollisions(int maxCollisions);
Parameters
NameTypeDefault
maxCollisionsint—
SetMotionvoid
# SetMotion
C#
public void SetMotion(Vector3 motion);
Parameters
NameTypeDefault
motionVector3—
SetRecoveryAsCollisionEnabledvoid
# SetRecoveryAsCollisionEnabled
C#
public void SetRecoveryAsCollisionEnabled(bool enabled);
Parameters
NameTypeDefault
enabledbool—
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.