RaycastHit class Physics
The closest collider intersected by a Ray, or one entry of a
raycast-all result list.
worldPoint is origin + direction.normalized() * distance.
worldNormal points out of the hit collider (opposite the ray's
direction of travel). distance is positive and measured along the
normalized direction. Ray is vector_math's class; backends
normalize its direction internally.
- Implementers
Constructors
- RaycastHit({required Node node, required Component collider, required Vector3 worldPoint, required Vector3 worldNormal, required double distance})
Properties
- collider → Component
-
The specific collider that was hit, in case the node carries more
than one.
final
- distance → double
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- node → Node
-
The node whose collider was hit.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- worldNormal → Vector3
-
final
- worldPoint → Vector3
-
final
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