-
Notifications
You must be signed in to change notification settings - Fork 5
Wander3DBehavior
Oğuz Eroğlu edited this page Jun 13, 2020
·
1 revision
Wander3DBehavior
behaves the same way as Wander2DBehavior without limiting the movement to a plane. It makes a steerable wander around in a 3D space. A whale moving freely in the ocean demonstrates this kind of behavior.
This behavior expects wanderSphereDistance
and wanderSphereRadius
parameters instead of wanderCircleDistance
and wanderCircleRadius
parameters of Wander2DBehavior
.
// create a steerable
var steerable = new Kompute.Steerable("steerable1", new Kompute.Vector3D(), new Kompute.Vector3D(10, 10, 10));
// set the velocity of the steerable (this is not necessary if the steerable has another behaviors)
steerable.velocity.set(-1000, 230, 500);
// create an instance of Wander3DBehavior
var wanderBehavior = new Kompute.Wander3DBehavior({
angleChange: Math.PI / 100,
wanderSphereDistance: 100,
wanderSphereRadius: 50
});
// set the behavior
steerable.setBehavior(wanderBehavior);
- 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