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

Bus for requests to the example character gameplay component. More...

#include <CharacterGameplayBus.h>

Inherits AZ::ComponentBus.

Public Member Functions

virtual bool IsOnGround () const =0
 Returns whether the character is standing on the ground (or another object which will prevent downward motion).
 
virtual float GetGravityMultiplier () const =0
 
virtual void SetGravityMultiplier (float gravityMultiplier)=0
 
virtual float GetGroundDetectionBoxHeight () const =0
 Gets the vertical size of the box used when checking for ground contact.
 
virtual void SetGroundDetectionBoxHeight (float groundDetectionBoxHeight)=0
 
virtual AZ::Vector3 GetFallingVelocity () const =0
 Gets the falling velocity.
 
virtual void SetFallingVelocity (const AZ::Vector3 &fallingVelocity)=0
 

Detailed Description

Bus for requests to the example character gameplay component.

Member Function Documentation

◆ GetGravityMultiplier()

virtual float PhysX::CharacterGameplayRequests::GetGravityMultiplier ( ) const
pure virtual

Gets the gravity multipier. The gravity multiplier is combined with the gravity value for the physics world to which the character belongs when applying gravity to the character.

◆ SetFallingVelocity()

virtual void PhysX::CharacterGameplayRequests::SetFallingVelocity ( const AZ::Vector3 &  fallingVelocity)
pure virtual

Sets the falling velocity. An example where this might be used is if gravity is disabled during a jump animation (because the character is then completely animation-driven and the up and down movement comes from the animation), then when the jump finishes gravity is re-enabled and an initial downwards velocity is needed to match the end of the animation.

◆ SetGravityMultiplier()

virtual void PhysX::CharacterGameplayRequests::SetGravityMultiplier ( float  gravityMultiplier)
pure virtual

Sets the gravity multipier. The gravity multiplier is combined with the gravity value for the physics world to which the character belongs when applying gravity to the character.

Parameters
gravityMultiplierThe new gravity multiplier value.

◆ SetGroundDetectionBoxHeight()

virtual void PhysX::CharacterGameplayRequests::SetGroundDetectionBoxHeight ( float  groundDetectionBoxHeight)
pure virtual

Sets the vertical size of the box used when checking for ground contact.

Parameters
groundDetectionBoxHeightThe new ground detection box height value.

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