PhysicsTestMotionParameters3D
Provides parameters for PhysicsServer3D.body_test_motion.
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
public PhysicsTestMotionParameters3D();Properties8
CollideSeparationRayProperty
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
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
public Reckfell.Collections.Array<int> ExcludeObjects { get; set; }Optional array of object unique instance ID to exclude from collision. See ReckfellObject.GetInstanceId.
FromProperty
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
public float Margin { get; set; }Increases the size of the shapes involved in the collision detection.
MaxCollisionsProperty
public int MaxCollisions { get; set; }Maximum number of returned collisions, between 1 and 32. Always returns the deepest detected collisions.
MotionProperty
public Vector3 Motion { get; set; }Motion vector to define the length and direction of the motion to test.
RecoveryAsCollisionProperty
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>
public Reckfell.Collections.Array<Rid> GetExcludeBodies();Reckfell.Collections.Array<Rid>GetExcludeObjectsReckfell.Collections.Array<int>
public Reckfell.Collections.Array<int> GetExcludeObjects();Reckfell.Collections.Array<int>GetFromTransform3D
public Transform3D GetFrom();Transform3DGetMarginfloat
public float GetMargin();floatGetMaxCollisionsint
public int GetMaxCollisions();intGetMotionVector3
public Vector3 GetMotion();Vector3IsCollideSeparationRayEnabledbool
public bool IsCollideSeparationRayEnabled();boolIsRecoveryAsCollisionEnabledbool
public bool IsRecoveryAsCollisionEnabled();boolSetCollideSeparationRayEnabledvoid
public void SetCollideSeparationRayEnabled(bool enabled);| Name | Type | Default |
|---|---|---|
enabled | bool | — |
SetExcludeBodiesvoid
public void SetExcludeBodies(Reckfell.Collections.Array<Rid> excludeList);| Name | Type | Default |
|---|---|---|
excludeList | Reckfell.Collections.Array<Rid> | — |
SetExcludeObjectsvoid
public void SetExcludeObjects(Reckfell.Collections.Array<int> excludeList);| Name | Type | Default |
|---|---|---|
excludeList | Reckfell.Collections.Array<int> | — |
SetFromvoid
public void SetFrom(Transform3D from);| Name | Type | Default |
|---|---|---|
from | Transform3D | — |
SetMarginvoid
public void SetMargin(float margin);| Name | Type | Default |
|---|---|---|
margin | float | — |
SetMaxCollisionsvoid
public void SetMaxCollisions(int maxCollisions);| Name | Type | Default |
|---|---|---|
maxCollisions | int | — |
SetMotionvoid
public void SetMotion(Vector3 motion);| Name | Type | Default |
|---|---|---|
motion | Vector3 | — |
SetRecoveryAsCollisionEnabledvoid
public void SetRecoveryAsCollisionEnabled(bool enabled);| Name | Type | Default |
|---|---|---|
enabled | bool | — |