Scripting API
Scripting API
RaycastHit3D
Record struct in Abyss.Physics3D, from Abyss.Physics3D.
What a ray or a swept shape hit first: see Physics3D.Raycast.
public readonly record struct RaycastHit3DConstructors
RaycastHit3D
public RaycastHit3D(ulong Entity, ulong Collider, Vector3 Point, Vector3 Normal, float Distance)What a ray or a swept shape hit first: see Physics3D.Raycast.
Parameters
Entity: The body whose collider it hit: an entity with a Rigidbody 3D, or ground.Collider: The entity of the collider it hit:Entityitself, or one under it.Point: Where, in world space.Normal: The normal of the surface there, a unit long, pointing out of it toward where the ray came from.Distance: How far it went to get there, in meters.
Properties
Entity
public ulong Entity { get; init; }The body whose collider it hit: an entity with a Rigidbody 3D, or ground.
Collider
public ulong Collider { get; init; }The entity of the collider it hit: Entity itself, or one under it.
Point
public Vector3 Point { get; init; }Where, in world space.
Normal
public Vector3 Normal { get; init; }The normal of the surface there, a unit long, pointing out of it toward where the ray came from.
Distance
public float Distance { get; init; }How far it went to get there, in meters.
