T - Type of vector, either 2D or 3D, implementing the Vector interfacepublic class CentralRayWithWhiskersConfiguration<T extends com.badlogic.gdx.math.Vector<T>> extends RayConfigurationBase<T>
CentralRayWithWhiskersConfiguration uses a long central ray and two shorter whiskers.
A central ray with short whiskers is often the best initial configuration to try but can make it impossible for the character to move down tight passages. Also, it is still susceptible to the corner trap, far less than the parallel configuration though.
owner, rays| Constructor and Description |
|---|
CentralRayWithWhiskersConfiguration(Steerable<T> owner,
float rayLength,
float whiskerLength,
float whiskerAngle)
Creates a
CentralRayWithWhiskersConfiguration for the given owner where the central ray has the specified length and
the two whiskers have the specified length and angle. |
| Modifier and Type | Method and Description |
|---|---|
float |
getRayLength()
Returns the length of the central ray.
|
float |
getWhiskerAngle()
Returns the angle in radians of the whiskers from the central ray.
|
float |
getWhiskerLength()
Returns the length of the two whiskers.
|
void |
setRayLength(float rayLength)
Sets the length of the central ray.
|
void |
setWhiskerAngle(float whiskerAngle)
Sets the angle in radians of the whiskers from the central ray.
|
void |
setWhiskerLength(float whiskerLength)
Sets the length of the two whiskers.
|
Ray<T>[] |
updateRays() |
getOwner, getRays, setOwner, setRayspublic CentralRayWithWhiskersConfiguration(Steerable<T> owner, float rayLength, float whiskerLength, float whiskerAngle)
CentralRayWithWhiskersConfiguration for the given owner where the central ray has the specified length and
the two whiskers have the specified length and angle.owner - the owner of this configurationrayLength - the length of the central raywhiskerLength - the length of the two whiskers (usually shorter than the central ray)whiskerAngle - the angle in radians of the whiskers from the central raypublic float getRayLength()
public void setRayLength(float rayLength)
public float getWhiskerLength()
public void setWhiskerLength(float whiskerLength)
public float getWhiskerAngle()
public void setWhiskerAngle(float whiskerAngle)