update force region to avoid vector scale Transform functions

This commit is contained in:
greerdv
2021-05-27 14:43:58 +01:00
parent 7353f262c5
commit dd94795106
3 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -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
+1 -2
View File
@@ -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;
+1 -1
View File
@@ -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;
};