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

Component used to register an entity as a dynamic rigid body in the PhysX simulation. More...

#include <RigidBodyComponent.h>

Inherits AZ::Component, AZ::EntityBus::Handler, Physics::RigidBodyRequestBus::Handler, AzPhysics::SimulatedBodyComponentRequestsBus::Handler, AZ::TickBus::Handler, and AZ::TransformNotificationBus::MultiHandler.

Public Member Functions

 AZ_COMPONENT (RigidBodyComponent, "{D4E52A70-BDE1-4819-BD3C-93AB3F4F3BE3}")
 
 RigidBodyComponent (const AzPhysics::RigidBodyConfiguration &config, AzPhysics::SceneHandle sceneHandle)
 
 RigidBodyComponent (const AzPhysics::RigidBodyConfiguration &baseConfig, const RigidBodyConfiguration &physxSpecificConfig, AzPhysics::SceneHandle sceneHandle)
 
void EnablePhysics () override
 
void DisablePhysics () override
 
bool IsPhysicsEnabled () const override
 
AzPhysics::SceneQueryHit RayCast (const AzPhysics::RayCastRequest &request) override
 
AZ::Aabb GetAabb () const override
 
AZ::Vector3 GetCenterOfMassWorld () const override
 
AZ::Vector3 GetCenterOfMassLocal () const override
 
AZ::Matrix3x3 GetInertiaWorld () const override
 
AZ::Matrix3x3 GetInertiaLocal () const override
 
AZ::Matrix3x3 GetInverseInertiaWorld () const override
 
AZ::Matrix3x3 GetInverseInertiaLocal () const override
 
float GetMass () const override
 
float GetInverseMass () const override
 
void SetMass (float mass) override
 
void SetCenterOfMassOffset (const AZ::Vector3 &comOffset) override
 
AZ::Vector3 GetLinearVelocity () const override
 
void SetLinearVelocity (const AZ::Vector3 &velocity) override
 
AZ::Vector3 GetAngularVelocity () const override
 
void SetAngularVelocity (const AZ::Vector3 &angularVelocity) override
 
AZ::Vector3 GetLinearVelocityAtWorldPoint (const AZ::Vector3 &worldPoint) const override
 
void ApplyLinearImpulse (const AZ::Vector3 &impulse) override
 
void ApplyLinearImpulseAtWorldPoint (const AZ::Vector3 &impulse, const AZ::Vector3 &worldPoint) override
 
void ApplyAngularImpulse (const AZ::Vector3 &angularImpulse) override
 
float GetLinearDamping () const override
 
void SetLinearDamping (float damping) override
 
float GetAngularDamping () const override
 
void SetAngularDamping (float damping) override
 
bool IsAwake () const override
 
void ForceAsleep () override
 
void ForceAwake () override
 
bool IsKinematic () const override
 
void SetKinematic (bool kinematic) override
 
void SetKinematicTarget (const AZ::Transform &targetPosition) override
 
bool IsGravityEnabled () const override
 
void SetGravityEnabled (bool enabled) override
 
void SetSimulationEnabled (bool enabled) override
 
float GetSleepThreshold () const override
 
void SetSleepThreshold (float threshold) override
 
AzPhysics::RigidBody * GetRigidBody () override
 
AzPhysics::SimulatedBody * GetSimulatedBody () override
 
AzPhysics::SimulatedBodyHandle GetSimulatedBodyHandle () const override
 
AzPhysics::RigidBodyConfiguration & GetConfiguration ()
 

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
 
void OnTick (float deltaTime, AZ::ScriptTimePoint time) override
 
int GetTickOrder () override
 
void OnTransformChanged (const AZ::Transform &local, const AZ::Transform &world) override
 

Detailed Description

Component used to register an entity as a dynamic rigid body in the PhysX simulation.


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