RaycastHit
namespace Griff.Runtime;
public struct RaycastHitWhere a ray first touched a collider or a solid tilemap.
Properties
Section titled “Properties”Distance
Section titled “Distance”public float Distance { get; init; }World units from the ray’s origin to Point.
Entity
Section titled “Entity”public Entity Entity { get; init; }Normal
Section titled “Normal”public Vector2 Normal { get; init; }The surface direction at the hit, pointing back toward the ray (e.g. up for a floor).
public Vector2 Point { get; init; }Methods
Section titled “Methods”Deconstruct
Section titled “Deconstruct”public void Deconstruct(out Entity Entity, out Vector2 Point, out Vector2 Normal, out float Distance)Equals
Section titled “Equals”public override bool Equals(object obj)Equals
Section titled “Equals”public bool Equals(RaycastHit other)GetHashCode
Section titled “GetHashCode”public override int GetHashCode()ToString
Section titled “ToString”public override string ToString()