Messages serviced by character controllers.
More...
#include <CharacterBus.h>
Inherits AZ::ComponentBus.
|
virtual AZ::Vector3 | GetBasePosition () const =0 |
| Gets the base position of the character.
|
|
virtual void | SetBasePosition (const AZ::Vector3 &position)=0 |
|
virtual AZ::Vector3 | GetCenterPosition () const =0 |
| Gets the position of the center of the character.
|
|
virtual float | GetStepHeight () const =0 |
| Gets the step height (the parameter which affects how high the character can step).
|
|
virtual void | SetStepHeight (float stepHeight)=0 |
|
virtual AZ::Vector3 | GetUpDirection () const =0 |
| Gets the character's up direction (the direction used by various controller logic, for example stepping).
|
|
virtual void | SetUpDirection (const AZ::Vector3 &upDirection)=0 |
|
virtual float | GetSlopeLimitDegrees () const =0 |
| Gets the maximum slope which the character can climb, in degrees.
|
|
virtual void | SetSlopeLimitDegrees (float slopeLimitDegrees)=0 |
|
virtual float | GetMaximumSpeed () const =0 |
|
virtual void | SetMaximumSpeed (float maximumSpeed)=0 |
|
virtual AZ::Vector3 | GetVelocity () const =0 |
| Gets the observed velocity of the character, which may differ from the desired velocity if the character is obstructed.
|
|
virtual void | AddVelocity (const AZ::Vector3 &velocity) |
|
virtual void | AddVelocityForTick (const AZ::Vector3 &velocity)=0 |
|
virtual void | AddVelocityForPhysicsTimestep (const AZ::Vector3 &velocity)=0 |
|
virtual bool | IsPresent () const |
|
virtual Character * | GetCharacter ()=0 |
| Gets a pointer to the Character object owned by the controller.
|
|
Messages serviced by character controllers.
◆ AddVelocityForPhysicsTimestep()
virtual void Physics::CharacterRequests::AddVelocityForPhysicsTimestep |
( |
const AZ::Vector3 & |
velocity | ) |
|
|
pure virtual |
Queues up a request to apply a velocity to the character, lasting for the duration of the physics timestep. All requests received are accumulated (so for example, the effects of animation and gravity can be applied in two separate requests), and the accumulated velocity is used when the character updates. Velocities added this way will apply until the end of the physics timestep. Obstacles may prevent the actual movement from exactly matching the requested movement.
- Parameters
-
velocity | The velocity to be added to the accumulated requests, lasting for the duration of a physics timestep. |
◆ AddVelocityForTick()
virtual void Physics::CharacterRequests::AddVelocityForTick |
( |
const AZ::Vector3 & |
velocity | ) |
|
|
pure virtual |
Queues up a request to apply a velocity to the character, lasting for the duration of the tick. All requests received are accumulated (so for example, the effects of animation and gravity can be applied in two separate requests), and the accumulated velocity is used when the character updates. Velocities added this way will apply until the end of the tick. Obstacles may prevent the actual movement from exactly matching the requested movement.
- Parameters
-
velocity | The velocity to be added to the accumulated requests, lasting for the duration of the tick. |
◆ GetMaximumSpeed()
virtual float Physics::CharacterRequests::GetMaximumSpeed |
( |
| ) |
const |
|
pure virtual |
Gets the maximum speed. If the accumulated requested velocity for the character exceeds this magnitude, it will be clamped.
◆ IsPresent()
virtual bool Physics::CharacterRequests::IsPresent |
( |
| ) |
const |
|
inlinevirtual |
Check if there is a character physics component present. Return true in the request handler implementation in order for things like the animation system to work properly.
◆ SetBasePosition()
virtual void Physics::CharacterRequests::SetBasePosition |
( |
const AZ::Vector3 & |
position | ) |
|
|
pure virtual |
Directly moves (teleports) the character to a new base position.
- Parameters
-
position | The new base position for the character. |
◆ SetMaximumSpeed()
virtual void Physics::CharacterRequests::SetMaximumSpeed |
( |
float |
maximumSpeed | ) |
|
|
pure virtual |
Sets the maximum speed. If the accumulated requested velocity for the character exceeds this magnitude, it will be clamped. Values below 0 will be treated as 0.
- Parameters
-
maximumSpeed | The new value for the maximum speed. |
◆ SetSlopeLimitDegrees()
virtual void Physics::CharacterRequests::SetSlopeLimitDegrees |
( |
float |
slopeLimitDegrees | ) |
|
|
pure virtual |
Sets the maximum slope which the character can climb, in degrees.
- Parameters
-
slopeLimitDegrees | the new slope limit value (in degrees, should be between 0 and 90). |
◆ SetStepHeight()
virtual void Physics::CharacterRequests::SetStepHeight |
( |
float |
stepHeight | ) |
|
|
pure virtual |
Sets the step height (the parameter which affects how high the character can step).
- Parameters
-
stepHeight | The new value for the step height parameter. |
◆ SetUpDirection()
virtual void Physics::CharacterRequests::SetUpDirection |
( |
const AZ::Vector3 & |
upDirection | ) |
|
|
pure virtual |
Sets the character's up direction (the direction used by various controller logic, for example stepping).
- Parameters
-
upDirection | The new value for the up direction. |
The documentation for this class was generated from the following file:
- Code/Framework/AzFramework/AzFramework/Physics/CharacterBus.h