sm.pathfinder.traversableRaycast

Looks at the surface of the navmesh from the start position toward the destination position to see if it is traversable.

Kind: Function

Environments: Game

Game

sm.pathfinder.traversableRaycast( world, start, destination, abilities )

Open the full Game reference

Availability: Server only

If the distance isn't fully traversable, the out_fDistance is the traversable distance.

Parameters:

Name Type Description
world World The world to look in.
start Vec3 The path start
destination Vec3 The path destination
abilities (optional) table Table of actor abilities { canWalk=boolean, canSwim=boolean }. Defaults to all abilities.

Returns:

Type Description
boolean
number
True if fully traversable, and a traversable distance when not fully traversable. (distance becomes FLT_MAX when fully traversable)