reckfellENGINE

PhysicsIntersectRayResult2D

Stores the result of a ray intersection query.

On this page
class PhysicsIntersectRayResult2DReckfellSharpInherits RefCounted

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
# PhysicsIntersectRayResult2D
C#
public PhysicsIntersectRayResult2D();

Properties6

ColliderProperty
# Collider
C#
public ReckfellObject Collider { get; }

The colliding object.

ColliderIdProperty
# ColliderId
C#
public ulong ColliderId { get; }

The colliding object's ID.

ColliderRidProperty
# ColliderRid
C#
public Rid ColliderRid { get; }

The intersecting object's Rid.

ColliderShapeProperty
# ColliderShape
C#
public int ColliderShape { get; }

The shape index of the colliding shape.

NormalProperty
# Normal
C#
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
# Position
C#
public Vector2 Position { get; }

The intersection point.

Methods6

GetColliderReckfellObject
# GetCollider
C#
public ReckfellObject GetCollider();
Returns ReckfellObject
GetColliderIdulong
# GetColliderId
C#
public ulong GetColliderId();
Returns ulong
GetColliderRidRid
# GetColliderRid
C#
public Rid GetColliderRid();
Returns Rid
GetColliderShapeint
# GetColliderShape
C#
public int GetColliderShape();
Returns int
GetNormalVector2
# GetNormal
C#
public Vector2 GetNormal();
Returns Vector2
GetPositionVector2
# GetPosition
C#
public Vector2 GetPosition();
Returns Vector2
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.