using System.Numerics; using Robust.Shared.GameObjects; namespace Robust.Shared.Physics { public readonly struct RayCastResults { /// /// The entity that was hit. /// public EntityUid HitEntity { get; } /// /// The point of contact where the entity was hit. Defaults to if no entity was hit. /// public Vector2 HitPos { get; } /// /// The distance from point of origin to the context point. 0.0f if nothing was hit. /// public float Distance { get; } public RayCastResults(float distance, Vector2 hitPos, EntityUid hitEntity) { Distance = distance; HitPos = hitPos; HitEntity = hitEntity; } } }