Record TRayCastResult

Hierarchy
Methods
Properties

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

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 = False.

Public Transform: TCastleTransform;

Hit TCastleTransform instance, if any. Always Nil if nothing was hit.

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 UNKNOWN(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 UNKNOWN(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 UNKNOWN(TCastleRigidBody.PhysicsRayCast, this is expressed in the local coordinate system of the rigid body.


Generated by PasDoc 0.16.0-snapshot.