Struct HitResult2D
Represents the result of a raycast hit in 2D space, containing information about the intersection point, distance from the origin, the hit element, and its bounding box.
Inherited Members
Namespace: Genesis.Physics
Assembly: Genesis.dll
Syntax
public struct HitResult2D
Fields
aabb
The axis-aligned bounding box (AABB) of the hit element.
Declaration
public Aabb aabb
Field Value
Type | Description |
---|---|
Aabb |
distance
The distance from the ray's origin to the intersection point.
Declaration
public float distance
Field Value
Type | Description |
---|---|
float |
hit
The game element that was hit by the raycast.
Declaration
public GameElement hit
Field Value
Type | Description |
---|---|
GameElement |
intersectionPoint
The intersection point of the raycast hit.
Declaration
public Vec3 intersectionPoint
Field Value
Type | Description |
---|---|
Vec3 |