Open 3D Engine AzFramework 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.
AzPhysics::ShapeCastRequest Struct Referencefinal

Sweeps a shape from a starting pose along a direction returning objects that intersected with the shape. More...

#include <PhysicsSceneQueries.h>

Inherits AzPhysics::SceneQueryRequest.

Public Member Functions

 AZ_RTTI (ShapeCastRequest, "{52F6C536-92F6-4C05-983D-0A74800AE56D}", SceneQueryRequest)
 
- Public Member Functions inherited from AzPhysics::SceneQueryRequest
 AZ_RTTI (SceneQueryRequest, "{76ECAB7D-42BA-461F-82E6-DCED8E1BDCB9}")
 
 SceneQueryRequest (RequestType requestType)
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
- Static Public Member Functions inherited from AzPhysics::SceneQueryRequest
static void Reflect (AZ::ReflectContext *context)
 

Public Attributes

 AZ_CLASS_ALLOCATOR_DECL
 
float m_distance = 500.0f
 
AZ::Transform m_start = AZ::Transform::CreateIdentity()
 The distance to cast along the direction. More...
 
AZ::Vector3 m_direction = AZ::Vector3::CreateZero()
 World space direction (Should be normalized)
 
AZStd::shared_ptr< Physics::ShapeConfigurationm_shapeConfiguration
 Shape information.
 
SceneQuery::HitFlags m_hitFlags = SceneQuery::HitFlags::Default | SceneQuery::HitFlags::MTD
 Query behavior flags. MTD Is On by default to correctly report objects that are initially in contact with the start pose.
 
SceneQuery::FilterCallback m_filterCallback = nullptr
 Hit filtering function.
 
bool m_reportMultipleHits = false
 flag to have the cast stop after the first hit or return all hits along the query.
 
- Public Attributes inherited from AzPhysics::SceneQueryRequest
 AZ_CLASS_ALLOCATOR_DECL
 
RequestType m_requestType = RequestType::Undefined
 
AZ::u32 m_maxResults = 32
 The Maximum results for this request to return, this is limited by the value set in the SceneConfiguration.
 
CollisionGroup m_collisionGroup = CollisionGroup::All
 Collision filter for the query.
 
SceneQuery::QueryType m_queryType = SceneQuery::QueryType::StaticAndDynamic
 Object types to include in the query.
 

Additional Inherited Members

- Public Types inherited from AzPhysics::SceneQueryRequest
enum class  RequestType : AZ::u8 { Undefined = 0 , Raycast , Shapecast , Overlap }
 

Detailed Description

Sweeps a shape from a starting pose along a direction returning objects that intersected with the shape.

Member Data Documentation

◆ m_start

AZ::Transform AzPhysics::ShapeCastRequest::m_start = AZ::Transform::CreateIdentity()

The distance to cast along the direction.

World space start position. Assumes only rotation + translation (no scaling).


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