Open 3D Engine PhysX Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
PhysX::CharacterController Class Reference

Inherits Physics::Character.

Public Member Functions

 AZ_CLASS_ALLOCATOR (CharacterController, AZ::SystemAllocator)
 
 AZ_RTTI (PhysX::CharacterController, "{A75A7D19-BC21-4F7E-A3D9-05031D2DFC94}", Physics::Character)
 
 CharacterController (physx::PxController *pxController, AZStd::unique_ptr< CharacterControllerCallbackManager > callbackManager, AzPhysics::SceneHandle sceneHandle)
 
CharacterControllerCallbackManagerGetCallbackManager ()
 
void SetFilterFlags (physx::PxQueryFlags filterFlags)
 
AZ::Vector3 GetBasePosition () const override
 
void SetBasePosition (const AZ::Vector3 &position) override
 
AZ::Vector3 GetCenterPosition () const override
 
float GetStepHeight () const override
 
void SetStepHeight (float stepHeight) override
 
AZ::Vector3 GetUpDirection () const override
 
void SetUpDirection (const AZ::Vector3 &upDirection) override
 
float GetSlopeLimitDegrees () const override
 
void SetSlopeLimitDegrees (float slopeLimitDegrees) override
 
float GetMaximumSpeed () const override
 
void SetMaximumSpeed (float maximumSpeed) override
 
AZ::Vector3 GetVelocity () const override
 
AzPhysics::CollisionLayer GetCollisionLayer () const override
 
AzPhysics::CollisionGroup GetCollisionGroup () const override
 
void SetCollisionLayer (const AzPhysics::CollisionLayer &layer) override
 
void SetCollisionGroup (const AzPhysics::CollisionGroup &group) override
 
AZ::Crc32 GetColliderTag () const override
 
void AddVelocityForTick (const AZ::Vector3 &velocity) override
 
void AddVelocityForPhysicsTimestep (const AZ::Vector3 &velocity) override
 
void ResetRequestedVelocityForTick () override
 
void ResetRequestedVelocityForPhysicsTimestep () override
 
void Move (const AZ::Vector3 &requestedMovement, float deltaTime) override
 
void ApplyRequestedVelocity (float deltaTime) override
 
void SetRotation (const AZ::Quaternion &rotation) override
 
void AttachShape (AZStd::shared_ptr< Physics::Shape > shape) override
 
AZ::EntityId GetEntityId () const override
 
AzPhysics::Scene * GetScene () override
 
AZ::Transform GetTransform () const override
 
void SetTransform (const AZ::Transform &transform) override
 
AZ::Vector3 GetPosition () const override
 
AZ::Quaternion GetOrientation () const override
 
AZ::Aabb GetAabb () const override
 
AzPhysics::SceneQueryHit RayCast (const AzPhysics::RayCastRequest &request) override
 
AZ::Crc32 GetNativeType () const override
 
void * GetNativePointer () const override
 
void Resize (float height)
 
float GetHeight () const
 
void SetHeight (float height)
 
float GetRadius () const
 
void SetRadius (float radius)
 
float GetHalfSideExtent () const
 
void SetHalfSideExtent (float halfSideExtent)
 
float GetHalfForwardExtent () const
 
void SetHalfForwardExtent (float halfForwardExtent)
 
void EnablePhysics (const Physics::CharacterConfiguration &configuration)
 
void DisablePhysics ()
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Member Function Documentation

◆ EnablePhysics()

void PhysX::CharacterController::EnablePhysics ( const Physics::CharacterConfiguration &  configuration)

Character Controller can be only enabled and disabled once after creation. And after being disabled it cannot be enabled again, it has to be destroyed and re-created. This is because the way PhysX controller works, it doesn't allow the state of having physics disabled, so being enabled/disabled is linked to be created/destroyed.


The documentation for this class was generated from the following file: