-
Notifications
You must be signed in to change notification settings - Fork 5
PrioritySteeringBehavior
Oğuz Eroğlu edited this page Jun 10, 2020
·
1 revision
PrioritySteeringBehavior iterates through the behaviors provided via list parameter and finds the first behavior which requests an acceleration greater than threshold. For instance, the HideBehavior will request acceleration only in certain cases. When it does request an acceleration it should be more prioritized than the other ones in case the steerable must hide from another steerable. PrioritySteeringBehavior allows us to combine behaviors in a way that we can still prioritize certain behaviors.
// create an instance of PrioritySteeringBehavior
var prioritySteeringBehavior = new Kompute.PrioritySteeringBehavior({
// put some behaviors we'd like to combine into the list
list: [new Kompute.SteeringBehavior(), new Kompute.SteeringBehavior()],
threshold: 10
});
// create a steerable
var steerable = new Kompute.Steerable("steerable1", new Kompute.Vector3D(), new Kompute.Vector3D(50, 50, 50));
// set PrioritySteeringBehavior
steerable.setBehavior(prioritySteeringBehavior);- Core
- Path
-
Steering Behaviors
- AlignBehavior
- ArriveBehavior
- AvoidBehavior
- BlendedSteeringBehavior
- CohesionBehavior
- EvadeBehavior
- FleeBehavior
- HideBehavior
- JumpBehavior
- LookWhereYouAreGoingBehavior
- PathFollowingBehavior
- PrioritySteeringBehavior
- PursueBehavior
- RandomPathBehavior
- RandomWaypointBehavior
- SeekBehavior
- SeparationBehavior
- Wander2DBehavior
- Wander3DBehavior
- Math
- Extra