public class RelativeWanderBehaviour extends WanderBehaviour
WanderBehaviour
WanderBehaviour.WanderWithoutWanderArea
AbstractStrengthSteeringBehaviour.negativeScalarMultiplier
AbstractSteeringBehaviour.IllegalBrakingFactor
Behaviour.behaviourNullAgentException
area, targetPosition, time, timeInterval
velocity
Constructor and Description |
---|
RelativeWanderBehaviour(Agent agent,
com.jme3.math.Vector3f from,
com.jme3.math.Vector3f to,
float relativeFactor) |
RelativeWanderBehaviour(Agent agent,
com.jme3.math.Vector3f from,
com.jme3.math.Vector3f to,
float relativeFactor,
com.jme3.scene.Spatial spatial) |
Modifier and Type | Method and Description |
---|---|
protected com.jme3.math.Vector3f |
calculateFullSteering()
Calculate steering vector.
|
protected void |
changeTargetPosition(float tpf)
Metod for changing target position.
|
controlRender, getTimeInterval, setArea, setTimeInterval
calculateSteering, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, turnOffStrengthControl
agentTotalMass, calculateNewVelocity, controlUpdate, getBrakingFactor, getTPF, getVelocity, rotateAgent, setBrakingFactor, setTPF, setVelocity
public RelativeWanderBehaviour(Agent agent, com.jme3.math.Vector3f from, com.jme3.math.Vector3f to, float relativeFactor)
relativeFactor
- How much should differ each new wander force ? A value
near to 0 means that each new force must differ slightly
from the previous one.WanderBehaviour.WanderBehaviour(com.jme3.ai.agents.Agent)
public RelativeWanderBehaviour(Agent agent, com.jme3.math.Vector3f from, com.jme3.math.Vector3f to, float relativeFactor, com.jme3.scene.Spatial spatial)
protected com.jme3.math.Vector3f calculateFullSteering()
calculateFullSteering
in class WanderBehaviour
AbstractSteeringBehaviour.calculateSteering()
protected void changeTargetPosition(float tpf)
WanderBehaviour
changeTargetPosition
in class WanderBehaviour
tpf
- time per frameWanderBehaviour.changeTargetPosition(float)