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::CharacterControllerComponent Class Reference

#include <CharacterControllerComponent.h>

Inherits AZ::Component, AZ::EntityBus::Handler, Physics::CharacterRequestBus::Handler, AzPhysics::SimulatedBodyComponentRequestsBus::Handler, AZ::TransformNotificationBus::Handler, CharacterControllerRequestBus::Handler, and Physics::CollisionFilteringRequestBus::Handler.

Public Member Functions

 AZ_COMPONENT (CharacterControllerComponent, "{BCBD8448-2FFC-450D-B82F-7C297D2F0C8C}")
 
 CharacterControllerComponent (AZStd::unique_ptr< Physics::CharacterConfiguration > characterConfig, AZStd::shared_ptr< Physics::ShapeConfiguration > shapeConfig)
 
Physics::CharacterConfiguration & GetCharacterConfiguration ()
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
static void GetProvidedServices (AZ::ComponentDescriptor::DependencyArrayType &provided)
 
static void GetIncompatibleServices (AZ::ComponentDescriptor::DependencyArrayType &incompatible)
 
static void GetRequiredServices (AZ::ComponentDescriptor::DependencyArrayType &required)
 
static void GetDependentServices ([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType &dependent)
 

Protected Member Functions

void Init () override
 
void Activate () override
 
void Deactivate () override
 
void OnEntityActivated (const AZ::EntityId &entityId) override
 
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
 
void AddVelocityForTick (const AZ::Vector3 &velocity) override
 
void AddVelocityForPhysicsTimestep (const AZ::Vector3 &velocity) override
 
bool IsPresent () const override
 
Physics::Character * GetCharacter () override
 
void EnablePhysics () override
 
void DisablePhysics () override
 
bool IsPhysicsEnabled () const override
 
AZ::Aabb GetAabb () const override
 
AzPhysics::SimulatedBody * GetSimulatedBody () override
 
AzPhysics::SimulatedBodyHandle GetSimulatedBodyHandle () const override
 
AzPhysics::SceneQueryHit RayCast (const AzPhysics::RayCastRequest &request) override
 
void Resize (float height) override
 
float GetHeight () override
 
void SetHeight (float height) override
 
float GetRadius () override
 
void SetRadius (float radius) override
 
float GetHalfSideExtent () override
 
void SetHalfSideExtent (float halfSideExtent) override
 
float GetHalfForwardExtent () override
 
void SetHalfForwardExtent (float halfForwardExtent) override
 
void OnTransformChanged (const AZ::Transform &local, const AZ::Transform &world) override
 
void SetCollisionLayer (const AZStd::string &layerName, AZ::Crc32 colliderTag) override
 
AZStd::string GetCollisionLayerName () override
 
void SetCollisionGroup (const AZStd::string &groupName, AZ::Crc32 colliderTag) override
 
AZStd::string GetCollisionGroupName () override
 
void ToggleCollisionLayer (const AZStd::string &layerName, AZ::Crc32 colliderTag, bool enabled) override
 

Detailed Description

Component used to physically represent characters for basic interactions with the physical world, for example to prevent walking through walls or falling through terrain.


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