Struct Physics3DHit
Result from a 3D physics query.
public readonly struct Physics3DHit
- Inherited Members
Constructors
Physics3DHit(LSCollider?, Vector3d, Vector3d, Fixed64, Vector3d)
Creates a 3D query hit from a world-space surface witness.
public Physics3DHit(LSCollider? collider, Vector3d point, Vector3d normal, Fixed64 distance, Vector3d direction)
Parameters
colliderLSColliderpointVector3dnormalVector3ddistanceFixed64directionVector3d
Physics3DHit(LSCollider?, ContactAnchor, Vector3d, Fixed64, Vector3d)
Creates a query hit with a rigid-frame surface witness.
public Physics3DHit(LSCollider? collider, ContactAnchor anchor, Vector3d normal, Fixed64 distance, Vector3d direction)
Parameters
colliderLSCollideranchorContactAnchornormalVector3ddistanceFixed64directionVector3d
Properties
Anchor
Gets the authoritative rigid-frame query witness.
public ContactAnchor Anchor { get; }
Property Value
Body
Gets the collider's body, or null for a bodyless hit.
public SolidBody? Body { get; }
Property Value
Collider
Gets the collider reported by the query, if any.
public LSCollider? Collider { get; }
Property Value
Direction
Gets the query direction associated with the hit.
public Vector3d Direction { get; }
Property Value
- Vector3d
Distance
Gets the distance from the query origin to the hit.
public Fixed64 Distance { get; }
Property Value
- Fixed64
Normal
Gets the world-space surface normal.
public Vector3d Normal { get; }
Property Value
- Vector3d
Point
Gets the materialized world-space query witness.
public Vector3d Point { get; }
Property Value
- Vector3d
Exceptions
- InvalidOperationException
The conceptual witness lies outside the representable coordinate range.
Methods
TryGetPoint(out Vector3d)
Attempts to materialize the world-space query witness without saturation.
public bool TryGetPoint(out Vector3d point)
Parameters
pointVector3d