User Tools

Site Tools



Behavior adding support to actors to step aside if told.

This behavior is useful for situations where actors can get in the way of the player or other actors. The behavior is a reactive behavior not acting by itself. It is triggered by ECBehaviorClearPath or other behaviors supporting it if the find a future collision.

This behavior has no effect if actor mover has a goal set.

This behavior can be disabled temporarily to prevent actors from stepping aside.

Behavior in action

Instance Counts

This behavior can be used only once on an element. The behavior always has identifier empty string.

Element Class Properties

Element class properties have the prefix stepAside..


Determines if the behavior is initially enabled.

  • Full name: “stepAside.enabled”
  • Type: boolean
  • Default Value: true
  • Example (*.deeclass)
    <boolean name='stepAside.enabled'>false</boolean>


Avoid radius. Actor tries to move to a position with this distance away from the moving lane of the actor requesting to step aside.

  • Full name: “stepAside.radius”
  • Type: floating point
  • Minimum Value: 0
  • Default value: 0.4
  • Example (*.deeclass)
    <float name='stepAside.radius'>0.5</float>

Required Behaviors

Optional Behaviors

This behavior does not support optional behaviors.


This behavior does support element class to be persistable (setPersistable). Saves enabled state.

API Documentation


Since DragonScript Module Version 1.4

Use Cases

  • Avoid actors blocking the path of other actors. The moving actors can make blocking actors move away.
  • Avoid player blocking actors or actors blocking the player.
  • Create situations where player or other actors are running and other actors move out of the way ahead of time.

Element Class Example

class ExampleElementClass extends BehaviorElementClass
   public var ECBehaviorComponent component
   public var ECBehaviorCollider collider
   public var ECBehaviorColliderAI colliderAI
   public var ECBehaviorLocomotion locomotion
   public var ECBehaviorNavigator navigator
   public var ECBehaviorActorMover actorMover
   public var ECBehaviorStepAside stepAside
   public func new() super("ExampleElement")
     // create required behaviors
     component =
     collider =, component)
     colliderAI =, collider)
     locomotion =, colliderAI)
     navigator =
     actorMover =, locomotion, navigator, null)
     // create step aside behavior
     stepAside =, actorMover)
You could leave a comment if you were logged in.
dragengine/modules/dragonscript/behavior_stepaside.txt · Last modified: 2020/11/24 09:58 by dragonlord