Record TRayCastResult
Unit
Declaration
type TRayCastResult = record
Description
Result of ray cast, that describes what is hit by a ray in a viewport. Routines that return this record include TCastleAbstractRootTransform.PhysicsRayCast and TCastleRigidBody.PhysicsRayCast.
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 UNKNOWN(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 UNKNOWN(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 UNKNOWN(TCastleRigidBody.PhysicsRayCast, this is expressed in the local coordinate system of the rigid body. |
Generated by PasDoc 0.16.0-snapshot.