PhysicsShapeQueryParameters3D
Provides parameters for PhysicsDirectSpaceState3D's methods.
Provides parameters for PhysicsDirectSpaceState3D's methods.
By changing various properties of this object, such as the shape, you can configure the parameters for PhysicsDirectSpaceState3D's methods.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
PhysicsShapeQueryParameters3DConstructor
public PhysicsShapeQueryParameters3D();Properties9
CollideWithAreasProperty
public bool CollideWithAreas { get; set; }If true, the query will take Area3Ds into account.
CollideWithBodiesProperty
public bool CollideWithBodies { get; set; }If true, the query will take PhysicsBody3Ds into account.
CollisionMaskProperty
public uint CollisionMask { get; set; }The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See Collision layers and masks in the documentation for more information.
ExcludeProperty
public Reckfell.Collections.Array<Rid> Exclude { get; set; }The list of object Rids that will be excluded from collisions. Use CollisionObject3D.GetRid to get the Rid associated with a CollisionObject3D-derived node.
Note: The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again.
MarginProperty
public float Margin { get; set; }The collision margin for the shape.
MotionProperty
public Vector3 Motion { get; set; }The motion of the shape being queried for.
ShapeProperty
public Resource Shape { get; set; }The Shape3D that will be used for collision/intersection queries. This stores the actual reference which avoids the shape to be released while being used for queries, so always prefer using this over PhysicsShapeQueryParameters3D.ShapeRid.
ShapeRidProperty
public Rid ShapeRid { get; set; }The queried shape's Rid that will be used for collision/intersection queries. Use this over PhysicsShapeQueryParameters3D.Shape if you want to optimize for performance using the Servers API:
RID shapeRid = PhysicsServer3D.SphereShapeCreate();
float radius = 2.0f;
PhysicsServer3D.ShapeSetData(shapeRid, radius);
var params = new PhysicsShapeQueryParameters3D();
params.ShapeRid = shapeRid;
// Execute physics queries here...
// Release the shape when done with physics queries.
PhysicsServer3D.FreeRid(shapeRid);TransformProperty
public Transform3D Transform { get; set; }The queried shape's transform matrix.
Methods18
GetCollisionMaskuint
public uint GetCollisionMask();uintGetExcludeReckfell.Collections.Array<Rid>
public Reckfell.Collections.Array<Rid> GetExclude();Reckfell.Collections.Array<Rid>GetMarginfloat
public float GetMargin();floatGetMotionVector3
public Vector3 GetMotion();Vector3GetShapeResource
public Resource GetShape();ResourceGetShapeRidRid
public Rid GetShapeRid();RidGetTransformTransform3D
public Transform3D GetTransform();Transform3DIsCollideWithAreasEnabledbool
public bool IsCollideWithAreasEnabled();boolIsCollideWithBodiesEnabledbool
public bool IsCollideWithBodiesEnabled();boolSetCollideWithAreasvoid
public void SetCollideWithAreas(bool enable);| Name | Type | Default |
|---|---|---|
enable | bool | — |
SetCollideWithBodiesvoid
public void SetCollideWithBodies(bool enable);| Name | Type | Default |
|---|---|---|
enable | bool | — |
SetCollisionMaskvoid
public void SetCollisionMask(uint collisionMask);| Name | Type | Default |
|---|---|---|
collisionMask | uint | — |
SetExcludevoid
public void SetExclude(Reckfell.Collections.Array<Rid> exclude);| Name | Type | Default |
|---|---|---|
exclude | Reckfell.Collections.Array<Rid> | — |
SetMarginvoid
public void SetMargin(float margin);| Name | Type | Default |
|---|---|---|
margin | float | — |
SetMotionvoid
public void SetMotion(Vector3 motion);| Name | Type | Default |
|---|---|---|
motion | Vector3 | — |
SetShapevoid
public void SetShape(Resource shape);| Name | Type | Default |
|---|---|---|
shape | Resource | — |
SetShapeRidvoid
public void SetShapeRid(Rid shape);| Name | Type | Default |
|---|---|---|
shape | Rid | — |
SetTransformvoid
public void SetTransform(Transform3D transform);| Name | Type | Default |
|---|---|---|
transform | Transform3D | — |