|
| AZ_CLASS_ALLOCATOR (Character, AZ::SystemAllocator, 0) |
|
| AZ_RTTI (Physics::Character, "{962E37A1-3401-4672-B896-0A6157CFAC97}", AzPhysics::SimulatedBody) |
|
virtual AZ::Vector3 | GetBasePosition () const =0 |
|
virtual void | SetBasePosition (const AZ::Vector3 &position)=0 |
|
virtual void | SetRotation (const AZ::Quaternion &rotation)=0 |
|
virtual AZ::Vector3 | GetCenterPosition () const =0 |
|
virtual float | GetStepHeight () const =0 |
|
virtual void | SetStepHeight (float stepHeight)=0 |
|
virtual AZ::Vector3 | GetUpDirection () const =0 |
|
virtual void | SetUpDirection (const AZ::Vector3 &upDirection)=0 |
|
virtual float | GetSlopeLimitDegrees () const =0 |
|
virtual void | SetSlopeLimitDegrees (float slopeLimitDegrees)=0 |
|
virtual float | GetMaximumSpeed () const =0 |
|
virtual void | SetMaximumSpeed (float maximumSpeed)=0 |
|
virtual AZ::Vector3 | GetVelocity () const =0 |
|
virtual void | SetCollisionLayer (const AzPhysics::CollisionLayer &layer)=0 |
|
virtual void | SetCollisionGroup (const AzPhysics::CollisionGroup &group)=0 |
|
virtual AzPhysics::CollisionLayer | GetCollisionLayer () const =0 |
|
virtual AzPhysics::CollisionGroup | GetCollisionGroup () const =0 |
|
virtual AZ::Crc32 | GetColliderTag () const =0 |
|
virtual void | AddVelocity (const AZ::Vector3 &velocity)=0 |
|
virtual void | ApplyRequestedVelocity (float deltaTime)=0 |
|
virtual void | AttachShape (AZStd::shared_ptr< Physics::Shape > shape)=0 |
|
Public Member Functions inherited from AzPhysics::SimulatedBody |
| AZ_RTTI (AzPhysics::SimulatedBody, "{BCC37A4F-1C05-4660-9E41-0CCF2D5E7175}") |
|
template<typename T > |
void | SetUserData (T *userData) |
|
void * | GetUserData () |
|
void | SetFrameId (uint32_t frameId) |
|
uint32_t | GetFrameId () const |
|
virtual AzPhysics::SceneQueryHit | RayCast (const RayCastRequest &request)=0 |
|
void | ProcessCollisionEvent (const CollisionEvent &collision) const |
|
void | ProcessTriggerEvent (const TriggerEvent &trigger) const |
|
void | RegisterOnCollisionBeginHandler (SimulatedBodyEvents::OnCollisionBegin::Handler &handler) |
|
void | RegisterOnCollisionPersistHandler (SimulatedBodyEvents::OnCollisionPersist::Handler &handler) |
| see RegisterOnCollisionBeginHandler
|
|
void | RegisterOnCollisionEndHandler (SimulatedBodyEvents::OnCollisionEnd::Handler &handler) |
| see RegisterOnCollisionBeginHandler
|
|
void | RegisterOnTriggerEnterHandler (SimulatedBodyEvents::OnTriggerEnter::Handler &handler) |
|
void | RegisterOnTriggerExitHandler (SimulatedBodyEvents::OnTriggerExit::Handler &handler) |
| see RegisterOnTriggerEnterHandler
|
|
virtual AZ::Crc32 | GetNativeType () const =0 |
|
virtual void * | GetNativePointer () const =0 |
|
virtual Scene * | GetScene () |
|
virtual AZ::EntityId | GetEntityId () const =0 |
|
virtual AZ::Transform | GetTransform () const =0 |
|
virtual void | SetTransform (const AZ::Transform &transform)=0 |
|
virtual AZ::Vector3 | GetPosition () const =0 |
|
virtual AZ::Quaternion | GetOrientation () const =0 |
|
virtual AZ::Aabb | GetAabb () const =0 |
|
|
Static Public Member Functions inherited from AzPhysics::SimulatedBody |
static void | Reflect (AZ::ReflectContext *context) |
|
Public Attributes inherited from AzPhysics::SimulatedBody |
| AZ_CLASS_ALLOCATOR_DECL |
|
SceneHandle | m_sceneOwner = AzPhysics::InvalidSceneHandle |
| The current Scene the simulated body is contained.
|
|
SimulatedBodyHandle | m_bodyHandle = AzPhysics::InvalidSimulatedBodyHandle |
| The handle to this simulated body.
|
|
bool | m_simulating = false |
|
Static Public Attributes inherited from AzPhysics::SimulatedBody |
static constexpr uint32_t | UndefinedFrameId = AZStd::numeric_limits<uint32_t>::max() |
|
Basic implementation of common character-style needs as a WorldBody. Is not a full-functional ship-ready all-purpose character controller implementation. This class just abstracts some common functionality amongst typical characters, and is take-it-or-leave it style; useful as a starting point or reference.
virtual void Physics::Character::ApplyRequestedVelocity |
( |
float |
deltaTime | ) |
|
|
pure virtual |
Applies the queued velocity requests and zeros the accumulated requested velocity. The expected usage is for this function to be called internally by the physics system once per tick, so that the cumulative result of multiple movement effects (e.g. animation, gravity, pseudo-impulses etc) can be combined from separate calls to AddVelocity. Accumulating the requests avoids performing multiple expensive character updates, and avoids any effects from the order of requests within a tick. Users who wish to add a new movement effect should generally just be able to use AddVelocity, and rely on the existing physics system call to ApplyRequestedVelocity.
- Parameters
-
deltaTime | The duration over which to apply the accumulated requested velocity. |