Open 3D Engine AzFramework 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.
Physics::CollisionRequests Class Referenceabstract

#include <CollisionBus.h>

Public Member Functions

 AZ_TYPE_INFO (CollisionRequests, "{5A937391-DC65-4E1D-84A6-AE151A1200D1}")
 
 CollisionRequests (CollisionRequests &&)=delete
 
CollisionRequestsoperator= (CollisionRequests &&)=delete
 
virtual AzPhysics::CollisionLayer GetCollisionLayerByName (const AZStd::string &layerName)=0
 Gets a collision layer by name. The Default layer is returned if the layer name was not found.
 
virtual AZStd::string GetCollisionLayerName (const AzPhysics::CollisionLayer &layer)=0
 Looks up the name of a collision layer.
 
virtual bool TryGetCollisionLayerByName (const AZStd::string &layerName, AzPhysics::CollisionLayer &collisionLayer)=0
 
virtual AzPhysics::CollisionGroup GetCollisionGroupByName (const AZStd::string &groupName)=0
 Gets a collision group by name. The All group is returned if the group name was not found.
 
virtual bool TryGetCollisionGroupByName (const AZStd::string &groupName, AzPhysics::CollisionGroup &collisionGroup)=0
 
virtual AZStd::string GetCollisionGroupName (const AzPhysics::CollisionGroup &collisionGroup)=0
 Looks up a name from a collision group.
 
virtual AzPhysics::CollisionGroup GetCollisionGroupById (const AzPhysics::CollisionGroups::Id &groupId)=0
 Gets a collision group by id.
 
virtual void SetCollisionLayerName (int index, const AZStd::string &layerName)=0
 Sets the layer name by index.
 
virtual void CreateCollisionGroup (const AZStd::string &groupName, const AzPhysics::CollisionGroup &group)=0
 Creates a new collision group preset with corresponding groupName.
 
virtual bool ShouldCollide (const Physics::ColliderConfiguration &colliderConfigurationA, const Physics::ColliderConfiguration &colliderConfigurationB)=0
 Returns whether two objects should collide, based on their collider configurations.
 

Detailed Description

CollisionRequests configures global project-level collision filtering settings. This is equivalent to setting values via the UI.

Member Function Documentation

◆ TryGetCollisionGroupByName()

virtual bool Physics::CollisionRequests::TryGetCollisionGroupByName ( const AZStd::string &  groupName,
AzPhysics::CollisionGroup collisionGroup 
)
pure virtual

Tries to find a collision group which matches groupName. Returns true if it was found, and the group is stored in collisionGroup, otherwise false.

◆ TryGetCollisionLayerByName()

virtual bool Physics::CollisionRequests::TryGetCollisionLayerByName ( const AZStd::string &  layerName,
AzPhysics::CollisionLayer collisionLayer 
)
pure virtual

Tries to find a collision layer which matches layerName. Returns true if it was found and the result is stored in collisionLayer, otherwise false.


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