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

#include <CharacterGameplayComponent.h>

Inherits AZ::Component, and CharacterGameplayRequestBus::Handler.

Public Member Functions

 AZ_COMPONENT (CharacterGameplayComponent, "{7F17120F-B9E7-4E50-AC6B-C84491DC7508}")
 
 CharacterGameplayComponent (const CharacterGameplayConfiguration &config)
 
bool IsOnGround () const override
 
float GetGravityMultiplier () const override
 
void SetGravityMultiplier (float gravityMultiplier) override
 
float GetGroundDetectionBoxHeight () const override
 
void SetGroundDetectionBoxHeight (float groundDetectionBoxHeight) override
 
AZ::Vector3 GetFallingVelocity () const override
 
void SetFallingVelocity (const AZ::Vector3 &fallingVelocity) override
 

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 (AZ::ComponentDescriptor::DependencyArrayType &dependent)
 

Protected Member Functions

void Init () override
 
void Activate () override
 
void Deactivate () override
 

Detailed Description

Character Gameplay Component. Gameplay behavior is likely to be highly game dependent. This component is provided as an example to work alongside the PhysX Character Controller Component to give more intuitive behavior out of the box, but keep things separate to make it easier for users to modify or replace the game specific logic. For example, the Character Gameplay Component demonstrates one approach to allow the character to be affected by gravity, which is not intrinsic behavior since the PhysX character controller is kinematic rather than dynamic.


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