public class FleeBehaviour extends AbstractStrengthSteeringBehaviour
AbstractStrengthSteeringBehaviour.negativeScalarMultiplier
AbstractSteeringBehaviour.IllegalBrakingFactor
Behaviour.behaviourNullAgentException
velocity
Constructor and Description |
---|
FleeBehaviour(Agent agent,
Agent target)
Constructor for flee behaviour.
|
FleeBehaviour(Agent agent,
Agent target,
com.jme3.scene.Spatial spatial)
Constructor for flee behaviour.
|
FleeBehaviour(Agent agent,
com.jme3.math.Vector3f fleePos)
Constructor for flee behaviour.
|
FleeBehaviour(Agent agent,
com.jme3.math.Vector3f fleePos,
com.jme3.scene.Spatial spatial)
Constructor for flee behaviour.
|
Modifier and Type | Method and Description |
---|---|
protected com.jme3.math.Vector3f |
calculateFullSteering()
Calculate steering vector.
|
protected void |
controlRender(com.jme3.renderer.RenderManager rm,
com.jme3.renderer.ViewPort vp) |
com.jme3.math.Vector3f |
getFleePos() |
Agent |
getTarget()
Get agent from whom we flee.
|
void |
setFleePos(com.jme3.math.Vector3f fleePos) |
void |
setTarget(Agent target)
Setting agent from whom we flee.
|
calculateSteering, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, turnOffStrengthControl
agentTotalMass, calculateNewVelocity, controlUpdate, getBrakingFactor, getTPF, getVelocity, rotateAgent, setBrakingFactor, setTPF, setVelocity
public FleeBehaviour(Agent agent, Agent target)
agent
- to whom behaviour belongstarget
- agent from whom we fleepublic FleeBehaviour(Agent agent, Agent target, com.jme3.scene.Spatial spatial)
agent
- to whom behaviour belongstarget
- agent from whom we fleespatial
- active spatial during excecution of behaviourpublic FleeBehaviour(Agent agent, com.jme3.math.Vector3f fleePos)
agent
- to whom behaviour belongsfleePos
- position from that we fleepublic FleeBehaviour(Agent agent, com.jme3.math.Vector3f fleePos, com.jme3.scene.Spatial spatial)
agent
- to whom behaviour belongsfleePos
- position from that we fleespatial
- active spatial during excecution of behaviourprotected void controlRender(com.jme3.renderer.RenderManager rm, com.jme3.renderer.ViewPort vp)
controlRender
in class com.jme3.scene.control.AbstractControl
protected com.jme3.math.Vector3f calculateFullSteering()
calculateFullSteering
in class AbstractStrengthSteeringBehaviour
AbstractStrengthSteeringBehaviour.calculateFullSteering()
public Agent getTarget()
public void setTarget(Agent target)
target
- public com.jme3.math.Vector3f getFleePos()
public void setFleePos(com.jme3.math.Vector3f fleePos)