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:
Source: transform/castletransform_physics.inc (line 33).
Overview
Fields
| Public | Hit: Boolean; |
| Public | Transform: TCastleTransform; |
| Public | Distance: Single; |
| Public | Point: TVector3; |
| Public | Normal: TVector3; |
Description
Fields
| Public | Hit: Boolean; |
|
Other fields are guaranteed to be all zero if Hit = | |
| Public | Transform: TCastleTransform; |
|
Hit TCastleTransform instance, if any. Always | |
| Public | 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. | |
| Public | 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. | |
| Public | 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.17.0.snapshot.