public class LeaderFollowingBehavior extends SeekBehavior
PursuitBehavior
timePerFrame, velocity
Constructor and Description |
---|
LeaderFollowingBehavior(Agent agent,
Agent target) |
LeaderFollowingBehavior(Agent agent,
Agent target,
float distanceToEvade,
float distanceToChangeFocus,
float minimunAngle) |
LeaderFollowingBehavior(Agent agent,
Agent target,
float distanceToEvade,
float distanceToChangeFocus,
float minimunAngle,
com.jme3.scene.Spatial spatial) |
LeaderFollowingBehavior(Agent agent,
Agent target,
com.jme3.scene.Spatial spatial) |
Modifier and Type | Method and Description |
---|---|
protected com.jme3.math.Vector3f |
calculateRawSteering()
Calculate steering vector.
|
getSeekingPosition, getTarget, setSeekingPosition, setTarget
calculateSteering, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, turnOffStrengthControl
agentTotalMass, calculateNewVelocity, controlUpdate, convertToGameEntities, getBrakingFactor, getTimePerFrame, getVelocity, rotateAgent, setBrakingFactor, setTimePerFrame, setVelocity
controlRender
public LeaderFollowingBehavior(Agent agent, Agent target, com.jme3.scene.Spatial spatial)
public LeaderFollowingBehavior(Agent agent, Agent target, float distanceToEvade, float distanceToChangeFocus, float minimunAngle)
distanceToChangeFocus
- Distance to change the focus: After the
agent distance to the target is lower than this distance, the agent will
progressively stop seeking the future position and instead, directly seek
the target.distanceToEvade
- If the agent is in front of the target and the
distance to him is lower than distanceToEvade, the agent will evade him
in order to stay out of his way.minimunAngle
- Minimum angle betwen the target velocity and the
vehicle location.BehaviorExceptions.TargetNotFoundException
- If target (leader) is
nullSteeringExceptions.NegativeValueException
- If distanceToEvade is
lower than 0 or if distanceToEvade is lower than 0LeaderFollowingBehavior(com.jme3.ai.agents.Agent,
com.jme3.ai.agents.Agent)
protected com.jme3.math.Vector3f calculateRawSteering()
SeekBehavior
calculateRawSteering
in class SeekBehavior
AbstractStrengthSteeringBehavior.calculateRawSteering()