sm.ai.directPathAvailable

Check if the unit can reach the target position by moving straight.

Kind: Function

Environments: Game

Game

sm.ai.directPathAvailable( unit, position, range )

Open the full Game reference

Parameters:

Name Type Description
unit Unit The unit.
position Vec3 The target position.
range number The maximum allowed distance to target position.

Returns:

Type Description
boolean Returns true if the position is available directly.