RayCastHit class final

Closest rigid-body intersection returned by a ray cast.

Constructors

RayCastHit({required RigidBody body, required Vector3 position, required double fraction, required double distance})
Creates an immutable hit result.
const

Properties

body → RigidBody
Rigid body whose collider was hit.
final
distance → double
Distance from the ray origin in world units.
final
fraction → double
Intersection position from 0 to 1 along the finite ray.
final
hashCode → int
The hash code for this object.
no setterinherited
position → Vector3
World-space intersection point.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited