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

#include <HeightfieldColliderComponent.h>

Inherits AZ::Component, ColliderComponentRequestBus::Handler, Physics::CollisionFilteringRequestBus::Handler, and AZ::Data::AssetBus::Handler.

Public Types

using Configuration = Physics::HeightfieldShapeConfiguration
 

Public Member Functions

 AZ_COMPONENT (HeightfieldColliderComponent, "{9A42672C-281A-4CE8-BFDD-EAA1E0FCED76}")
 
void Activate () override
 
void InitHeightfieldCollider (HeightfieldCollider::DataSource heightfieldDataSource)
 
void Deactivate () override
 
void SetColliderConfiguration (const Physics::ColliderConfiguration &colliderConfig)
 
void SetBakedHeightfieldAsset (const AZ::Data::Asset< Pipeline::HeightFieldAsset > &heightfieldAsset)
 
void BlockOnPendingJobs ()
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
static void GetProvidedServices (AZ::ComponentDescriptor::DependencyArrayType &provided)
 
static void GetRequiredServices (AZ::ComponentDescriptor::DependencyArrayType &required)
 
static void GetIncompatibleServices (AZ::ComponentDescriptor::DependencyArrayType &incompatible)
 

Protected Member Functions

AzPhysics::ShapeColliderPairList GetShapeConfigurations () override
 
AZStd::vector< AZStd::shared_ptr< Physics::Shape > > GetShapes () override
 
void SetCollisionLayer (const AZStd::string &layerName, AZ::Crc32 filterTag) override
 
AZStd::string GetCollisionLayerName () override
 
void SetCollisionGroup (const AZStd::string &groupName, AZ::Crc32 filterTag) override
 
AZStd::string GetCollisionGroupName () override
 
void ToggleCollisionLayer (const AZStd::string &layerName, AZ::Crc32 filterTag, bool enabled) override
 
void OnAssetReady (AZ::Data::Asset< AZ::Data::AssetData > asset)
 
void OnAssetReload (AZ::Data::Asset< AZ::Data::AssetData > asset)
 
void OnAssetError (AZ::Data::Asset< AZ::Data::AssetData > asset)
 

Detailed Description

Component that provides a Heightfield Collider. It covers the static rigid body functionality as well, but it can be refactored out once EditorStaticRigidBodyComponent handles the creation of the simulated body.

The heightfield collider is a bit different from the other shape colliders in that it gets the heightfield data from a HeightfieldProvider, which can control position, rotation, size, and even change its data at runtime. Due to these differences, this component directly implements the collider instead of using BaseColliderComponent.


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