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.
|
Structure that contains information of an individual hit related to a SceneQuery. More...
#include <PhysicsSceneQueries.h>
Public Member Functions | |
AZ_TYPE_INFO (SceneQueryHit, "{7A7201B9-67B5-438B-B4EB-F3EEBB78C617}") | |
operator bool () const | |
bool | IsValid () const |
Static Public Member Functions | |
static void | Reflect (AZ::ReflectContext *context) |
Public Attributes | |
AZ_CLASS_ALLOCATOR_DECL | |
SceneQuery::ResultFlags | m_resultFlags = SceneQuery::ResultFlags::Invalid |
float | m_distance = 0.0f |
AzPhysics::SimulatedBodyHandle | m_bodyHandle = AzPhysics::InvalidSimulatedBodyHandle |
AZ::EntityId | m_entityId |
Physics::Shape * | m_shape = nullptr |
Physics::MaterialId | m_physicsMaterialId |
AZ::Vector3 | m_position = AZ::Vector3::CreateZero() |
AZ::Vector3 | m_normal = AZ::Vector3::CreateZero() |
Structure that contains information of an individual hit related to a SceneQuery.
AzPhysics::SimulatedBodyHandle AzPhysics::SceneQueryHit::m_bodyHandle = AzPhysics::InvalidSimulatedBodyHandle |
Handler to the simulated body that was hit. Valid if SceneQuery::ResultFlags::BodyHandle is set.
float AzPhysics::SceneQueryHit::m_distance = 0.0f |
The distance along the cast at which the hit occurred as given by Dot(m_normal, startPoint) - Dot(m_normal, m_position). Valid if SceneQuery::ResultFlags::Distance is set.
AZ::EntityId AzPhysics::SceneQueryHit::m_entityId |
The Entity Id of the body that was hit. Valid if SceneQuery::ResultFlags::EntityId is set.
AZ::Vector3 AzPhysics::SceneQueryHit::m_normal = AZ::Vector3::CreateZero() |
The normal of the surface hit. Valid if SceneQuery::ResultFlags::Normal is set.
Physics::MaterialId AzPhysics::SceneQueryHit::m_physicsMaterialId |
The physics material id on the shape (or face) that was hit. Valid if SceneQuery::ResultFlags::Material is set.
AZ::Vector3 AzPhysics::SceneQueryHit::m_position = AZ::Vector3::CreateZero() |
The position of the hit in world space. Valid if SceneQuery::ResultFlags::Position is set.
SceneQuery::ResultFlags AzPhysics::SceneQueryHit::m_resultFlags = SceneQuery::ResultFlags::Invalid |
Flags used to determine what members are valid. If the flag is true, the member will have a valid value.
Physics::Shape* AzPhysics::SceneQueryHit::m_shape = nullptr |
The shape on the body that was hit. Valid if SceneQuery::ResultFlags::Shape is set.