public abstract class AbstractStrengthSteeringBehavior extends AbstractSteeringBehavior
SteerStrengthType
,
AbstractSteeringBehavior
timePerFrame, velocity
Constructor and Description |
---|
AbstractStrengthSteeringBehavior(Agent agent) |
AbstractStrengthSteeringBehavior(Agent agent,
com.jme3.scene.Spatial spatial) |
Modifier and Type | Method and Description |
---|---|
protected abstract com.jme3.math.Vector3f |
calculateRawSteering()
If a behavior class extend from CompoundSteeringBehaviour instead of
AbstractSteeringBehavior, it must implement this method instead of
calculateSteering().
|
protected com.jme3.math.Vector3f |
calculateSteering()
Calculates the steering force with the specified strength.
|
void |
setupStrengthControl(float scalar)
If you call this function you will be able to increase or decrease the
steering behavior force multiplying it by a scalar.
|
void |
setupStrengthControl(float x,
float y,
float z)
If you call this function you will be able to modify the raw steering
force on the specific axis (x, y, z).
|
void |
setupStrengthControl(com.jme3.math.Plane plane)
Forces the steer to stay inside a plane.
|
void |
setupStrengthControl(com.jme3.math.Plane plane,
float scalar) |
void |
setupStrengthControl(com.jme3.math.Vector3f vector)
If you call this function you will be able to modify the raw steering
force on the specific axis (x, y, z).
|
void |
turnOffStrengthControl()
If this function is called, this class work as AbstractSteeringBehavior.
|
agentTotalMass, calculateNewVelocity, controlUpdate, convertToGameEntities, getBrakingFactor, getTimePerFrame, getVelocity, rotateAgent, setBrakingFactor, setTimePerFrame, setVelocity
controlRender
public AbstractStrengthSteeringBehavior(Agent agent)
public AbstractStrengthSteeringBehavior(Agent agent, com.jme3.scene.Spatial spatial)
public void setupStrengthControl(float scalar)
scalar
- Scalar that will multiply the raw steer force.SteeringExceptions.NegativeValueException
- If scalar is lower than 0public void setupStrengthControl(float x, float y, float z)
x
- X axis multipliery
- Y axis multiplierz
- Z axis multiplierSteeringExceptions.NegativeValueException
- If any axis multiplier is lower than 0public void setupStrengthControl(com.jme3.math.Vector3f vector)
x
- X axis multipliery
- Y axis multiplierz
- Z axis multiplierSteeringExceptions.NegativeValueException
- If any axis multiplier is lower than 0public void setupStrengthControl(com.jme3.math.Plane plane)
Plane
- plane where the steer will bepublic void setupStrengthControl(com.jme3.math.Plane plane, float scalar)
public void turnOffStrengthControl()
AbstractSteeringBehavior
protected com.jme3.math.Vector3f calculateSteering()
calculateSteering
in class AbstractSteeringBehavior
protected abstract com.jme3.math.Vector3f calculateRawSteering()
AbstractSteeringBehavior.calculateSteering()