-
Notifications
You must be signed in to change notification settings - Fork 5
FleeBehavior
Oğuz Eroğlu edited this page Jun 8, 2020
·
1 revision
FleeBehavior makes a steerable goes away from a target position with its maximum acceleration. This behavior produces the inverse of what SeekBehavior produces.
// create an instance of FleeBehavior
var fleeBehavior = new Kompute.FleeBehavior();
// create a steerable at (0, 0, 0) of size (50, 50, 50)
var steerable = new Kompute.Steerable("steerable1", new Kompute.Vector3D(), new Kompute.Vector3D(50, 50, 50));
// set the max velocity and acceleration of steerable
steerable.maxSpeed = 1000;
steerable.maxAcceleration = 100;
// set FleeBehavior
steerable.setBehavior(fleeBehavior);
// set a target position to steerable
steerable.setTargetPosition(new Kompute.Vector3D(100, 200, 300));- 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