PhysicsRayQueryParameters3D
Parameters for a one-shot 3D ray query.
From and To are world endpoints of one segment. CollisionMask filters candidate Layers; CollideWithBodies/CollideWithAreas choose categories. Exclude holds physics-object RIDs, not instance IDs.
Parameters are not automatically inherited from a camera/weapon. Validate finite coordinates, a positive distance when computing endpoints and the intended world. Account for HitFromInside and geometry limitations separately; backface detection does not fill a concave surface.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
PhysicsRayQueryParameters3DConstructor
public PhysicsRayQueryParameters3D();Properties8
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; }Physics-object RIDs excluded from the query. Obtain them with CollisionObject.GetRid; GetInstanceId and visual mesh references are not those RIDs.
FromProperty
public Vector3 From { get; set; }The starting point of the ray being queried for, in global coordinates.
HitBackFacesProperty
public bool HitBackFaces { get; set; }If true, the query will hit back faces with concave polygon shapes with back face enabled or heightmap shapes.
HitFromInsideProperty
public bool HitFromInside { get; set; }If true, the query will detect a hit when starting inside shapes. In this case the collision normal will be Vector3(0, 0, 0). Does not affect concave polygon shapes or heightmap shapes.
ToProperty
public Vector3 To { get; set; }The ending point of the ray being queried for, in global coordinates.
Methods17
CreatePhysicsRayQueryParameters3D
public static PhysicsRayQueryParameters3D Create(Vector3 from, Vector3 to, uint collisionMask = 4294967295, Reckfell.Collections.Array<Rid> exclude = null);Returns a new, pre-configured PhysicsRayQueryParameters3D object. Use it to quickly create query parameters using the most common options.
| Name | Type | Default |
|---|---|---|
from | Vector3 | — |
to | Vector3 | — |
collisionMask | uint | 4294967295 |
exclude | Reckfell.Collections.Array<Rid> | null |
PhysicsRayQueryParameters3DGetCollisionMaskuint
public uint GetCollisionMask();uintGetExcludeReckfell.Collections.Array<Rid>
public Reckfell.Collections.Array<Rid> GetExclude();Reckfell.Collections.Array<Rid>GetFromVector3
public Vector3 GetFrom();Vector3GetToVector3
public Vector3 GetTo();Vector3IsCollideWithAreasEnabledbool
public bool IsCollideWithAreasEnabled();boolIsCollideWithBodiesEnabledbool
public bool IsCollideWithBodiesEnabled();boolIsHitBackFacesEnabledbool
public bool IsHitBackFacesEnabled();boolIsHitFromInsideEnabledbool
public bool IsHitFromInsideEnabled();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> | — |
SetFromvoid
public void SetFrom(Vector3 from);| Name | Type | Default |
|---|---|---|
from | Vector3 | — |
SetHitBackFacesvoid
public void SetHitBackFaces(bool enable);| Name | Type | Default |
|---|---|---|
enable | bool | — |
SetHitFromInsidevoid
public void SetHitFromInside(bool enable);| Name | Type | Default |
|---|---|---|
enable | bool | — |
SetTovoid
public void SetTo(Vector3 to);| Name | Type | Default |
|---|---|---|
to | Vector3 | — |