Struct PhysicsMixedHit
Result from an explicit mixed 3D/2D query.
public readonly struct PhysicsMixedHit
- Inherited Members
Constructors
PhysicsMixedHit(LSCollider?, LSCollider2D?, Vector3d, Vector3d, Vector3d, PhysicsQueryReducerKind, Fixed64, Vector3d)
Creates a mixed query hit from world-space surface witnesses.
public PhysicsMixedHit(LSCollider? collider3D, LSCollider2D? collider2D, Vector3d point3D, Vector3d point2D, Vector3d normal3DTo2D, PhysicsQueryReducerKind reducerKind, Fixed64 distance, Vector3d direction3D)
Parameters
collider3DLSCollidercollider2DLSCollider2Dpoint3DVector3dpoint2DVector3dnormal3DTo2DVector3dreducerKindPhysicsQueryReducerKinddistanceFixed64direction3DVector3d
PhysicsMixedHit(LSCollider?, LSCollider2D?, ContactAnchor, ContactAnchor, Vector3d, PhysicsQueryReducerKind, Fixed64, Vector3d)
Creates a mixed query hit with rigid-frame surface witnesses.
public PhysicsMixedHit(LSCollider? collider3D, LSCollider2D? collider2D, ContactAnchor anchor3D, ContactAnchor anchor2D, Vector3d normal3DTo2D, PhysicsQueryReducerKind reducerKind, Fixed64 distance, Vector3d direction3D)
Parameters
collider3DLSCollidercollider2DLSCollider2Danchor3DContactAnchoranchor2DContactAnchornormal3DTo2DVector3dreducerKindPhysicsQueryReducerKinddistanceFixed64direction3DVector3d
Exceptions
- ArgumentException
Either rigid-frame anchor is invalid.
Properties
Anchor2D
Gets the rigid-frame witness on the embedded 2D volume.
public ContactAnchor Anchor2D { get; }
Property Value
Anchor3D
Gets the rigid-frame witness on the 3D shape.
public ContactAnchor Anchor3D { get; }
Property Value
Body2D
Gets the 2D collider's body, if any.
public SolidBody2D? Body2D { get; }
Property Value
Body3D
Gets the 3D collider's body, if any.
public SolidBody? Body3D { get; }
Property Value
Collider2D
Gets the 2D collider participating in the hit, if registered.
public LSCollider2D? Collider2D { get; }
Property Value
Collider3D
Gets the 3D collider participating in the hit, if registered.
public LSCollider? Collider3D { get; }
Property Value
Direction3D
Gets the world-space sweep direction associated with the hit.
public Vector3d Direction3D { get; }
Property Value
- Vector3d
Distance
Distance travelled by the swept source center before impact.
public Fixed64 Distance { get; }
Property Value
- Fixed64
Normal3DTo2D
Normal pointing from the 3D collider or swept 3D source toward the embedded 2D volume.
public Vector3d Normal3DTo2D { get; }
Property Value
- Vector3d
NormalFor2DSource
Planar normal suitable for clamping a 2D source moving into a 3D target.
public Vector2d NormalFor2DSource { get; }
Property Value
- Vector2d
NormalFor3DSource
Surface normal suitable for clamping a 3D source moving into an embedded 2D target.
public Vector3d NormalFor3DSource { get; }
Property Value
- Vector3d
Point2D
Gets the materialized embedded-2D witness.
public Vector3d Point2D { get; }
Property Value
- Vector3d
Exceptions
- InvalidOperationException
The conceptual witness lies outside the representable coordinate range.
Point3D
Gets the materialized 3D witness.
public Vector3d Point3D { get; }
Property Value
- Vector3d
Exceptions
- InvalidOperationException
The conceptual witness lies outside the representable coordinate range.
ReducerKind
Gets whether this mixed query hit was produced by an exact shape reducer or a conservative fallback.
public PhysicsQueryReducerKind ReducerKind { get; }
Property Value
Methods
TryGetPoint2D(out Vector3d)
Attempts to materialize the embedded-2D witness without saturation.
public bool TryGetPoint2D(out Vector3d point)
Parameters
pointVector3d
Returns
TryGetPoint3D(out Vector3d)
Attempts to materialize the 3D witness without saturation.
public bool TryGetPoint3D(out Vector3d point)
Parameters
pointVector3d