-
Notifications
You must be signed in to change notification settings - Fork 5
ArriveBehavior
Oğuz Eroğlu edited this page Aug 3, 2020
·
4 revisions
Available here.
ArriveBehavior makes a steerable arrive to a target position. The steerable goes towards the target position with maximum speed until it is slowDownRadius units away from the target. Once it reaches there, it then slows down until it is satisfactionRadius units away from the target. It then stops.
// create an instance of ArriveBehavior
var arriveBehavior = new Kompute.ArriveBehavior({
satisfactionRadius: 5,
slowDownRadius: 50
});
// 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 ArriveBehavior
steerable.setBehavior(arriveBehavior);
// 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