API Docs for:
Show:

AIScriptWalk Class

An AI script object. Causes the entity to walk left to right and back based on the facing direction. If it detects a wall, it causes the entity to turn around. Requires a GroundedMovement component, all the dynamic physics components and a FacingDirection component to be present.

Constructor

AIScriptWalk

(
  • wallDetectorRightRay
)

Parameters:

  • wallDetectorRightRay Ray

    A ray that will be used to detect walls. The beginning position of the ray should be defined relatively to the position of the entity. The ray is for detecting walls on the right side, the left variant is calculated automatically.

Methods

getWallDetectorRightRay

() Ray

Returns:

Ray: The ray object.

setWallDetectorRightRay

(
  • wallDetectorRightRay
)

Parameters:

  • wallDetectorRightRay Ray

    A ray that will be used to detect walls. The beginning position of the ray should be defined relatively to the position of the entity. The ray is for detecting walls on the right side, the left variant is calculated automatically.