update force region to avoid vector scale Transform functions
This commit is contained in:
@@ -148,7 +148,7 @@ namespace PhysX
|
||||
{
|
||||
m_worldTransform = world;
|
||||
m_regionParams.m_position = world.GetTranslation();
|
||||
m_regionParams.m_scale = world.GetScale();
|
||||
m_regionParams.m_scale = world.GetUniformScale();
|
||||
m_regionParams.m_rotation = world.GetRotation();
|
||||
AZ::EBusReduceResult<AZ::Aabb, PhysX::TriggerAabbAggregator> triggerAabb;
|
||||
triggerAabb.value = AZ::Aabb::CreateNull();
|
||||
@@ -223,7 +223,7 @@ namespace PhysX
|
||||
, entityId
|
||||
, &AZ::TransformBus::Events::GetWorldTM);
|
||||
regionParams.m_position = worldTransform.GetTranslation();
|
||||
regionParams.m_scale = worldTransform.GetScale();
|
||||
regionParams.m_scale = worldTransform.GetUniformScale();
|
||||
regionParams.m_rotation = worldTransform.GetRotation();
|
||||
|
||||
LmbrCentral::SplineComponentRequestBus::EventResult(regionParams.m_spline
|
||||
|
||||
@@ -294,8 +294,7 @@ namespace PhysX
|
||||
rotateInverse.InvertFull();
|
||||
}
|
||||
|
||||
AZ::Vector3 scaleInverse = region.m_scale;
|
||||
scaleInverse = scaleInverse.GetReciprocal();
|
||||
float scaleInverse = 1.0f / region.m_scale;
|
||||
|
||||
AZ::Vector3 position = entity.m_position + entity.m_velocity * m_lookAhead;
|
||||
AZ::Vector3 localPos = position - region.m_position;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace PhysX
|
||||
AZ::EntityId m_id;
|
||||
AZ::Vector3 m_position;
|
||||
AZ::Quaternion m_rotation;
|
||||
AZ::Vector3 m_scale;
|
||||
float m_scale;
|
||||
AZ::SplinePtr m_spline;
|
||||
AZ::Aabb m_aabb;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user