PhysicsIntersectRayResult2D
Stores the result of a ray intersection query.
Stores the result of a ray intersection query.
This object contains the intersection information produced by PhysicsDirectSpaceState2D.IntersectRayInto.
After calling PhysicsDirectSpaceState2D.IntersectRayInto, the fields of this object will be populated with the hit information if the ray intersects a shape. If no intersection occurred, the values remain unchanged from the previous state.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
PhysicsIntersectRayResult2DConstructor
public PhysicsIntersectRayResult2D();Properties6
ColliderProperty
public ReckfellObject Collider { get; }The colliding object.
ColliderIdProperty
public ulong ColliderId { get; }The colliding object's ID.
ColliderRidProperty
public Rid ColliderRid { get; }The intersecting object's Rid.
ColliderShapeProperty
public int ColliderShape { get; }The shape index of the colliding shape.
NormalProperty
public Vector2 Normal { get; }The object's surface normal at the intersection point, or Vector2(0, 0) if the ray starts inside the shape and PhysicsRayQueryParameters2D.HitFromInside is true.
PositionProperty
public Vector2 Position { get; }The intersection point.
Methods6
GetColliderReckfellObject
public ReckfellObject GetCollider();ReckfellObjectGetColliderIdulong
public ulong GetColliderId();ulongGetColliderRidRid
public Rid GetColliderRid();RidGetColliderShapeint
public int GetColliderShape();intGetNormalVector2
public Vector2 GetNormal();Vector2GetPositionVector2
public Vector2 GetPosition();Vector2