public class SimpleWanderBehavior extends AbstractWanderBehavior
AbstractWander
Modifier and Type | Class and Description |
---|---|
protected class |
SimpleWanderBehavior.MaxRandSteer
Random offset
|
Modifier and Type | Field and Description |
---|---|
protected com.jme3.math.Vector3f |
currentSteer
Current steer force.
|
protected SimpleWanderBehavior.MaxRandSteer |
maxRandSteer |
protected float |
time
Current time.
|
timeInterval
timePerFrame, velocity
Constructor and Description |
---|
SimpleWanderBehavior(Agent agent,
float rX,
float rY,
float rZ) |
SimpleWanderBehavior(Agent agent,
float rX,
float rY,
float rZ,
com.jme3.scene.Spatial spatial) |
Modifier and Type | Method and Description |
---|---|
protected com.jme3.math.Vector3f |
calculateRawSteering()
Calculate steering vector.
|
protected void |
changeSteer(float tpf)
Metod for changing the steer force.
|
boolean |
getHasConstantMod() |
protected com.jme3.math.Vector3f |
newRandomSteer() |
void |
setConstantMod(float value)
The generated steer module will be a constant value.
|
void |
setMaxRandSteer(float rX,
float rY,
float rZ)
Setting random steer
|
getTimeInterval, setTimeInterval
calculateSteering, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, turnOffStrengthControl
agentTotalMass, calculateNewVelocity, controlUpdate, convertToGameEntities, getBrakingFactor, getTimePerFrame, getVelocity, rotateAgent, setBrakingFactor, setTimePerFrame, setVelocity
controlRender
protected com.jme3.math.Vector3f currentSteer
protected float time
protected SimpleWanderBehavior.MaxRandSteer maxRandSteer
Offset
public SimpleWanderBehavior(Agent agent, float rX, float rY, float rZ)
agent
- to whom behavior belongsrX
- max x-random steerrY
- max y-random steerrZ
- max z-random steerpublic SimpleWanderBehavior(Agent agent, float rX, float rY, float rZ, com.jme3.scene.Spatial spatial)
spatial
- active spatial during excecution of behaviorSimpleWanderBehavior(com.jme3.ai.agents.Agent, float, float, float)
protected com.jme3.math.Vector3f calculateRawSteering()
calculateRawSteering
in class AbstractStrengthSteeringBehavior
AbstractSteeringBehavior.calculateSteering()
protected void changeSteer(float tpf)
tpf
- time per frameprotected com.jme3.math.Vector3f newRandomSteer()
public void setMaxRandSteer(float rX, float rY, float rZ)
rX
- max x-random steerrY
- max y-random steerrZ
- max z-random steerpublic void setConstantMod(float value)
distance
- Target-Agent distancepublic boolean getHasConstantMod()