Record TRayCastResult
Unit
Declaration
type TRayCastResult = record
Description
Result of "ray cast" and "sphere cast", that describes what is hit by a ray (or sphere moving along a ray) in a viewport. Routines that return this record include:
Overview
Fields
![]() |
Hit: Boolean; |
![]() |
Transform: TCastleTransform; |
![]() |
Distance: Single; |
![]() |
Point: TVector3; |
![]() |
Normal: TVector3; |
Description
Fields
![]() |
Hit: Boolean; |
Other fields are guaranteed to be all zero if Hit = |
![]() |
Transform: TCastleTransform; |
Hit TCastleTransform instance, if any. Always |
![]() |
Distance: Single; |
Distance from ray origin to the hit point. Always 0 if nothing was hit. Expressed in the world coordinate system, i.e. in the coordinates seen by TCastleViewport.Items. Exception: When the TRayCastResult is returned by TCastleRigidBody.PhysicsRayCast, this is expressed in the local coordinate system of the rigid body. |
![]() |
Point: TVector3; |
Hit point, and the normal vector at this point of the collider. Expressed in the world coordinate system, i.e. in the coordinates seen by TCastleViewport.Items. Exception: When the TRayCastResult is returned by TCastleRigidBody.PhysicsRayCast, this is expressed in the local coordinate system of the rigid body. |
![]() |
Normal: TVector3; |
Hit point, and the normal vector at this point of the collider. Expressed in the world coordinate system, i.e. in the coordinates seen by TCastleViewport.Items. Exception: When the TRayCastResult is returned by TCastleRigidBody.PhysicsRayCast, this is expressed in the local coordinate system of the rigid body. |
Generated by PasDoc 0.16.0-snapshot.