public class PathFollowBehavior extends AbstractStrengthSteeringBehavior
timePerFrame, velocity
Constructor and Description |
---|
PathFollowBehavior(Agent agent,
java.util.ArrayList<com.jme3.math.Vector3f> orderedPointsList,
float pathRadius) |
PathFollowBehavior(Agent agent,
java.util.ArrayList<com.jme3.math.Vector3f> orderedPointsList,
float pathRadius,
float cohesionStrength) |
PathFollowBehavior(Agent agent,
java.util.ArrayList<com.jme3.math.Vector3f> orderedPointsList,
float pathRadius,
float cohesionStrength,
com.jme3.scene.Spatial spatial) |
PathFollowBehavior(Agent agent,
java.util.ArrayList<com.jme3.math.Vector3f> orderedPointsList,
float pathRadius,
com.jme3.scene.Spatial spatial) |
Modifier and Type | Method and Description |
---|---|
protected com.jme3.math.Vector3f |
calculateRawSteering()
If a behavior class extend from CompoundSteeringBehaviour instead of
AbstractSteeringBehavior, it must implement this method instead of
calculateSteering().
|
boolean |
isActive() |
void |
reset()
Reset the behavior.
|
void |
setActive(boolean active) |
calculateSteering, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, turnOffStrengthControl
agentTotalMass, calculateNewVelocity, controlUpdate, convertToGameEntities, getBrakingFactor, getTimePerFrame, getVelocity, rotateAgent, setBrakingFactor, setTimePerFrame, setVelocity
controlRender
public PathFollowBehavior(Agent agent, java.util.ArrayList<com.jme3.math.Vector3f> orderedPointsList, float pathRadius)
orderedPointsList
- Ordered points that will set the path spine and
consequently the path route. The minimum number of points is two.pathRadius
- Spine radius i.e the path widthSteeringExceptions.PathFollowInsufficientPointsException
- If orderedPointsList size
is lower than 2SteeringExceptions.NegativeValueException
- If path radius is
negativeAbstractStrengthSteeringBehavior.AbstractStrengthSteeringBehavior(com.jme3.ai.agents.Agent)
public PathFollowBehavior(Agent agent, java.util.ArrayList<com.jme3.math.Vector3f> orderedPointsList, float pathRadius, com.jme3.scene.Spatial spatial)
public PathFollowBehavior(Agent agent, java.util.ArrayList<com.jme3.math.Vector3f> orderedPointsList, float pathRadius, float cohesionStrength)
cohesionStrength
- Cohesion multiplierPathFollowNegativeCohesionStrengthException
- If cohesionStrength
is negativePathFollowBehavior(com.jme3.ai.agents.Agent,
java.util.ArrayList, float)
public PathFollowBehavior(Agent agent, java.util.ArrayList<com.jme3.math.Vector3f> orderedPointsList, float pathRadius, float cohesionStrength, com.jme3.scene.Spatial spatial)
cohesionStrength
- Cohesion multiplierPathFollowBehavior(com.jme3.ai.agents.Agent,
java.util.ArrayList, float, com.jme3.scene.Spatial)
public void reset()
protected com.jme3.math.Vector3f calculateRawSteering()
AbstractStrengthSteeringBehavior
calculateRawSteering
in class AbstractStrengthSteeringBehavior
AbstractStrengthSteeringBehavior.calculateRawSteering()
public void setActive(boolean active)
public boolean isActive()