Syntax

Result = dbStaticRaycast(x1.f, y1.f, z1.f, z2.f, y2.f, z2.f)

Description

This command allows you to return the distance to the static world along the specified ray. If there is no intersection, this value is zero. If there was an intersection, this value is the distance to the closest intersection point. This function allows for easy placement of decals and vectors for bouncing objects off walls.

 

Use the checklist functions to find the values associated with the ray collision:

 

dbChecklistString (1)

A string with the first part the mesh number and the second part the frame number

 

dbChecklistString (2)

A string with 3 parts storing the vertex indices for the triangle that was intersected

 

dbChecklistFValueA(3), dbChecklistFValueB(3), dbChecklistFValueC(3)

Object space coordinates for vertex 0 e.g. 1.0, 2.0, 3.0

 

dbChecklistFValueA(4), dbChecklistFValueB(4), dbChecklistFValueC(4)

Object space coordinates for vertex 0 e.g. 1.0, 2.0, 3.0

 

dbChecklistFValueA(5), dbChecklistFValueB(5), dbChecklistFValueC(5)

Object space coordinates for vertex 0 e.g. 1.0, 2.0, 3.0

 

dbChecklistFValueA(6), dbChecklistFValueB(6), dbChecklistFValueC(6)

World space coordinates where the collision took place e.g. 1.0, 2.0, 3.0

 

dbChecklistFValueA(7), dbChecklistFValueB(7), dbChecklistFValueC(7)

Normal of polygon that was hit e.g. 0.0, 1.0, 0.0

 

dbChecklistFValueA(8), dbChecklistFValueB(8), dbChecklistFValueC(8)

Reflection normal based on angle of impact e.g. 0.0, 1.0, 0.0

See Also

dbAddStaticScorch, dbSetStaticScorch, dbStaticVolume