Table Of Contents

Previous topic

19.5. The PhysicsDevice Object

Next topic

19.7. The RigidBody Object

This Page

19.6. The RayHit Object

A RayHit object contains result information of a ray test or a convex sweep test.

19.6.1. Properties

19.6.1.1. collisionObject

Summary

The CollisionObject that caused the hit, or null if the test hit a RigidBody.

Syntax

var collisionObject = rayHit.collisionObject;
if (collisionObject)
{
}

Note

Read Only

19.6.1.2. body

Summary

The RigidBody that caused the hit, or null if the test hit a CollisionObject.

Syntax

var body = rayHit.body;
if (body)
{
}

Note

Read Only

19.6.1.3. hitPoint

Summary

The Vector3 object representing the location in world space of the hit.

Syntax

var hitLocation = rayHit.hitPoint;

Note

Read Only

19.6.1.4. hitNormal

Summary

The Vector3 object representing the normal of the surface in world space of the hit.

Syntax

var hitNormal = rayHit.hitNormal;

Note

Read Only