mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-07-05 23:15:52 +00:00
CCollisionActorManager: Minor tidying
Bracing consistency and using const where applicable.
This commit is contained in:
parent
d26521b41d
commit
6931737aef
@ -13,88 +13,106 @@ CCollisionActorManager::CCollisionActorManager(CStateManager& mgr, TUniqueId own
|
|||||||
const std::vector<CJointCollisionDescription>& descs, bool active)
|
const std::vector<CJointCollisionDescription>& descs, bool active)
|
||||||
: x10_ownerId(owner), x12_active(active) {
|
: x10_ownerId(owner), x12_active(active) {
|
||||||
if (TCastToConstPtr<CActor> act = mgr.GetObjectById(x10_ownerId)) {
|
if (TCastToConstPtr<CActor> act = mgr.GetObjectById(x10_ownerId)) {
|
||||||
zeus::CTransform xf = act->GetTransform();
|
const zeus::CTransform xf = act->GetTransform();
|
||||||
const CAnimData* animData = act->GetModelData()->GetAnimationData();
|
const CAnimData* animData = act->GetModelData()->GetAnimationData();
|
||||||
zeus::CVector3f scale = act->GetModelData()->GetScale();
|
const zeus::CVector3f scale = act->GetModelData()->GetScale();
|
||||||
zeus::CTransform scaleXf = zeus::CTransform::Scale(scale);
|
const zeus::CTransform scaleXf = zeus::CTransform::Scale(scale);
|
||||||
|
|
||||||
x0_jointDescriptions.reserve(descs.size());
|
x0_jointDescriptions.reserve(descs.size());
|
||||||
for (const CJointCollisionDescription& desc : descs) {
|
for (const CJointCollisionDescription& desc : descs) {
|
||||||
CJointCollisionDescription modDesc = desc;
|
CJointCollisionDescription modDesc = desc;
|
||||||
modDesc.ScaleAllBounds(scale);
|
modDesc.ScaleAllBounds(scale);
|
||||||
zeus::CTransform locXf = GetWRLocatorTransform(*animData, modDesc.GetPivotId(), xf, scaleXf);
|
const zeus::CTransform locXf = GetWRLocatorTransform(*animData, modDesc.GetPivotId(), xf, scaleXf);
|
||||||
|
|
||||||
if (modDesc.GetNextId().IsValid()) {
|
if (modDesc.GetNextId().IsValid()) {
|
||||||
zeus::CTransform locXf2 = GetWRLocatorTransform(*animData, modDesc.GetNextId(), xf, scaleXf);
|
const zeus::CTransform locXf2 = GetWRLocatorTransform(*animData, modDesc.GetNextId(), xf, scaleXf);
|
||||||
float dist = (locXf2.origin - locXf.origin).magnitude();
|
const float dist = (locXf2.origin - locXf.origin).magnitude();
|
||||||
|
|
||||||
if (modDesc.GetType() == CJointCollisionDescription::ECollisionType::OBBAutoSize) {
|
if (modDesc.GetType() == CJointCollisionDescription::ECollisionType::OBBAutoSize) {
|
||||||
if (dist <= FLT_EPSILON)
|
if (dist <= FLT_EPSILON) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
zeus::CVector3f bounds = modDesc.GetBounds();
|
zeus::CVector3f bounds = modDesc.GetBounds();
|
||||||
bounds.y() += dist;
|
bounds.y() += dist;
|
||||||
CCollisionActor* newAct =
|
auto* newAct =
|
||||||
new CCollisionActor(mgr.AllocateUniqueId(), area, x10_ownerId, bounds,
|
new CCollisionActor(mgr.AllocateUniqueId(), area, x10_ownerId, bounds,
|
||||||
zeus::CVector3f(0.f, 0.5f * dist, 0.f), active, modDesc.GetMass(), desc.GetName());
|
zeus::CVector3f(0.f, 0.5f * dist, 0.f), active, modDesc.GetMass(), desc.GetName());
|
||||||
|
|
||||||
if (modDesc.GetOrientationType() == CJointCollisionDescription::EOrientationType::Zero) {
|
if (modDesc.GetOrientationType() == CJointCollisionDescription::EOrientationType::Zero) {
|
||||||
newAct->SetTransform(locXf);
|
newAct->SetTransform(locXf);
|
||||||
} else {
|
} else {
|
||||||
zeus::CVector3f delta = (locXf2.origin - locXf.origin).normalized();
|
const zeus::CVector3f delta = (locXf2.origin - locXf.origin).normalized();
|
||||||
zeus::CVector3f upVector = locXf.basis[2];
|
zeus::CVector3f upVector = locXf.basis[2];
|
||||||
if (zeus::close_enough(std::fabs(delta.dot(upVector)), 1.f))
|
|
||||||
|
if (zeus::close_enough(std::fabs(delta.dot(upVector)), 1.f)) {
|
||||||
upVector = locXf.basis[1];
|
upVector = locXf.basis[1];
|
||||||
|
}
|
||||||
|
|
||||||
newAct->SetTransform(zeus::lookAt(locXf.origin, locXf.origin + delta, upVector));
|
newAct->SetTransform(zeus::lookAt(locXf.origin, locXf.origin + delta, upVector));
|
||||||
}
|
}
|
||||||
|
|
||||||
mgr.AddObject(newAct);
|
mgr.AddObject(newAct);
|
||||||
x0_jointDescriptions.push_back(desc);
|
x0_jointDescriptions.push_back(desc);
|
||||||
x0_jointDescriptions.back().SetCollisionActorId(newAct->GetUniqueId());
|
x0_jointDescriptions.back().SetCollisionActorId(newAct->GetUniqueId());
|
||||||
} else {
|
} else {
|
||||||
TUniqueId newId = mgr.AllocateUniqueId();
|
const TUniqueId newId = mgr.AllocateUniqueId();
|
||||||
CCollisionActor* newAct =
|
auto* newAct = new CCollisionActor(newId, area, x10_ownerId, active, modDesc.GetRadius(), modDesc.GetMass(),
|
||||||
new CCollisionActor(newId, area, x10_ownerId, active, modDesc.GetRadius(), modDesc.GetMass(),
|
|
||||||
desc.GetName());
|
desc.GetName());
|
||||||
|
|
||||||
newAct->SetTransform(locXf);
|
newAct->SetTransform(locXf);
|
||||||
mgr.AddObject(newAct);
|
mgr.AddObject(newAct);
|
||||||
x0_jointDescriptions.push_back(CJointCollisionDescription::SphereCollision(
|
x0_jointDescriptions.push_back(CJointCollisionDescription::SphereCollision(
|
||||||
modDesc.GetPivotId(), modDesc.GetRadius(), modDesc.GetName(), 0.001f));
|
modDesc.GetPivotId(), modDesc.GetRadius(), modDesc.GetName(), 0.001f));
|
||||||
x0_jointDescriptions.back().SetCollisionActorId(newId);
|
x0_jointDescriptions.back().SetCollisionActorId(newId);
|
||||||
u32 numSeps = u32(dist / modDesc.GetMaxSeparation());
|
|
||||||
if (numSeps) {
|
const u32 numSeps = u32(dist / modDesc.GetMaxSeparation());
|
||||||
|
if (numSeps != 0) {
|
||||||
x0_jointDescriptions.reserve(x0_jointDescriptions.capacity() + numSeps);
|
x0_jointDescriptions.reserve(x0_jointDescriptions.capacity() + numSeps);
|
||||||
float pitch = dist / float(numSeps + 1);
|
const float pitch = dist / float(numSeps + 1);
|
||||||
for (u32 i = 0; i < numSeps; ++i) {
|
for (u32 i = 0; i < numSeps; ++i) {
|
||||||
float separation = pitch * float(i + 1);
|
const float separation = pitch * float(i + 1);
|
||||||
x0_jointDescriptions.push_back(CJointCollisionDescription::SphereSubdivideCollision(
|
x0_jointDescriptions.push_back(CJointCollisionDescription::SphereSubdivideCollision(
|
||||||
modDesc.GetPivotId(), modDesc.GetNextId(), modDesc.GetRadius(), separation,
|
modDesc.GetPivotId(), modDesc.GetNextId(), modDesc.GetRadius(), separation,
|
||||||
CJointCollisionDescription::EOrientationType::One, modDesc.GetName(), 0.001f));
|
CJointCollisionDescription::EOrientationType::One, modDesc.GetName(), 0.001f));
|
||||||
TUniqueId newId2 = mgr.AllocateUniqueId();
|
|
||||||
CCollisionActor* newAct2 =
|
const TUniqueId newId2 = mgr.AllocateUniqueId();
|
||||||
new CCollisionActor(newId2, area, x10_ownerId, active, modDesc.GetRadius(), modDesc.GetMass(),
|
auto* newAct2 = new CCollisionActor(newId2, area, x10_ownerId, active, modDesc.GetRadius(),
|
||||||
desc.GetName());
|
modDesc.GetMass(), desc.GetName());
|
||||||
if (modDesc.GetOrientationType() == CJointCollisionDescription::EOrientationType::Zero) {
|
if (modDesc.GetOrientationType() == CJointCollisionDescription::EOrientationType::Zero) {
|
||||||
newAct2->SetTransform(zeus::CTransform::Translate(locXf.origin + separation * locXf.basis[1]));
|
newAct2->SetTransform(zeus::CTransform::Translate(locXf.origin + separation * locXf.basis[1]));
|
||||||
} else {
|
} else {
|
||||||
zeus::CVector3f delta = (locXf2.origin - locXf.origin).normalized();
|
const zeus::CVector3f delta = (locXf2.origin - locXf.origin).normalized();
|
||||||
zeus::CVector3f upVector = locXf.basis[2];
|
zeus::CVector3f upVector = locXf.basis[2];
|
||||||
if (zeus::close_enough(std::fabs(delta.dot(upVector)), 1.f))
|
|
||||||
|
if (zeus::close_enough(std::fabs(delta.dot(upVector)), 1.f)) {
|
||||||
upVector = locXf.basis[1];
|
upVector = locXf.basis[1];
|
||||||
zeus::CTransform lookAt = zeus::lookAt(zeus::skZero3f, delta, upVector);
|
}
|
||||||
|
|
||||||
|
const zeus::CTransform lookAt = zeus::lookAt(zeus::skZero3f, delta, upVector);
|
||||||
newAct2->SetTransform(zeus::CTransform::Translate(lookAt.basis[1] * separation + locXf.origin));
|
newAct2->SetTransform(zeus::CTransform::Translate(lookAt.basis[1] * separation + locXf.origin));
|
||||||
}
|
}
|
||||||
|
|
||||||
mgr.AddObject(newAct2);
|
mgr.AddObject(newAct2);
|
||||||
x0_jointDescriptions.back().SetCollisionActorId(newId2);
|
x0_jointDescriptions.back().SetCollisionActorId(newId2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
TUniqueId newId = mgr.AllocateUniqueId();
|
const TUniqueId newId = mgr.AllocateUniqueId();
|
||||||
CCollisionActor* newAct;
|
CCollisionActor* newAct;
|
||||||
if (modDesc.GetType() == CJointCollisionDescription::ECollisionType::Sphere)
|
|
||||||
|
if (modDesc.GetType() == CJointCollisionDescription::ECollisionType::Sphere) {
|
||||||
newAct = new CCollisionActor(newId, area, x10_ownerId, active, modDesc.GetRadius(), modDesc.GetMass(),
|
newAct = new CCollisionActor(newId, area, x10_ownerId, active, modDesc.GetRadius(), modDesc.GetMass(),
|
||||||
desc.GetName());
|
desc.GetName());
|
||||||
else if (modDesc.GetType() == CJointCollisionDescription::ECollisionType::OBB)
|
} else if (modDesc.GetType() == CJointCollisionDescription::ECollisionType::OBB) {
|
||||||
newAct = new CCollisionActor(newId, area, x10_ownerId, modDesc.GetBounds(), modDesc.GetPivotPoint(), active,
|
newAct = new CCollisionActor(newId, area, x10_ownerId, modDesc.GetBounds(), modDesc.GetPivotPoint(), active,
|
||||||
modDesc.GetMass(), desc.GetName());
|
modDesc.GetMass(), desc.GetName());
|
||||||
else
|
} else {
|
||||||
newAct = new CCollisionActor(newId, area, x10_ownerId, modDesc.GetBounds(), active, modDesc.GetMass(),
|
newAct = new CCollisionActor(newId, area, x10_ownerId, modDesc.GetBounds(), active, modDesc.GetMass(),
|
||||||
desc.GetName());
|
desc.GetName());
|
||||||
|
}
|
||||||
|
|
||||||
newAct->SetTransform(locXf);
|
newAct->SetTransform(locXf);
|
||||||
mgr.AddObject(newAct);
|
mgr.AddObject(newAct);
|
||||||
x0_jointDescriptions.push_back(desc);
|
x0_jointDescriptions.push_back(desc);
|
||||||
@ -105,8 +123,9 @@ CCollisionActorManager::CCollisionActorManager(CStateManager& mgr, TUniqueId own
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CCollisionActorManager::Destroy(CStateManager& mgr) const {
|
void CCollisionActorManager::Destroy(CStateManager& mgr) const {
|
||||||
for (const CJointCollisionDescription& desc : x0_jointDescriptions)
|
for (const CJointCollisionDescription& desc : x0_jointDescriptions) {
|
||||||
mgr.FreeScriptObject(desc.GetCollisionActorId());
|
mgr.FreeScriptObject(desc.GetCollisionActorId());
|
||||||
|
}
|
||||||
|
|
||||||
const_cast<CCollisionActorManager&>(*this).x13_destroyed = true;
|
const_cast<CCollisionActorManager&>(*this).x13_destroyed = true;
|
||||||
}
|
}
|
||||||
@ -115,26 +134,33 @@ void CCollisionActorManager::SetActive(CStateManager& mgr, bool active) {
|
|||||||
x12_active = active;
|
x12_active = active;
|
||||||
for (const CJointCollisionDescription& jDesc : x0_jointDescriptions) {
|
for (const CJointCollisionDescription& jDesc : x0_jointDescriptions) {
|
||||||
if (TCastToPtr<CActor> act = mgr.ObjectById(jDesc.GetCollisionActorId())) {
|
if (TCastToPtr<CActor> act = mgr.ObjectById(jDesc.GetCollisionActorId())) {
|
||||||
bool curActive = act->GetActive();
|
const bool curActive = act->GetActive();
|
||||||
if (curActive != active)
|
if (curActive != active) {
|
||||||
act->SetActive(active);
|
act->SetActive(active);
|
||||||
|
}
|
||||||
|
|
||||||
if (active)
|
if (active) {
|
||||||
Update(0.f, mgr, EUpdateOptions::WorldSpace);
|
Update(0.f, mgr, EUpdateOptions::WorldSpace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CCollisionActorManager::AddMaterial(CStateManager& mgr, const CMaterialList& list) {
|
void CCollisionActorManager::AddMaterial(CStateManager& mgr, const CMaterialList& list) {
|
||||||
for (const CJointCollisionDescription& jDesc : x0_jointDescriptions)
|
for (const CJointCollisionDescription& jDesc : x0_jointDescriptions) {
|
||||||
if (TCastToPtr<CActor> act = mgr.ObjectById(jDesc.GetCollisionActorId()))
|
if (TCastToPtr<CActor> act = mgr.ObjectById(jDesc.GetCollisionActorId())) {
|
||||||
act->AddMaterial(list);
|
act->AddMaterial(list);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CCollisionActorManager::SetMovable(CStateManager& mgr, bool movable) {
|
void CCollisionActorManager::SetMovable(CStateManager& mgr, bool movable) {
|
||||||
if (x14_movable == movable)
|
if (x14_movable == movable) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
x14_movable = movable;
|
x14_movable = movable;
|
||||||
|
|
||||||
for (const CJointCollisionDescription& jDesc : x0_jointDescriptions) {
|
for (const CJointCollisionDescription& jDesc : x0_jointDescriptions) {
|
||||||
if (TCastToPtr<CCollisionActor> act = mgr.ObjectById(jDesc.GetCollisionActorId())) {
|
if (TCastToPtr<CCollisionActor> act = mgr.ObjectById(jDesc.GetCollisionActorId())) {
|
||||||
act->SetMovable(x14_movable);
|
act->SetMovable(x14_movable);
|
||||||
@ -144,23 +170,30 @@ void CCollisionActorManager::SetMovable(CStateManager& mgr, bool movable) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CCollisionActorManager::Update(float dt, CStateManager& mgr, EUpdateOptions opts) {
|
void CCollisionActorManager::Update(float dt, CStateManager& mgr, EUpdateOptions opts) {
|
||||||
if (!x14_movable)
|
if (!x14_movable) {
|
||||||
SetMovable(mgr, true);
|
SetMovable(mgr, true);
|
||||||
if (x12_active) {
|
}
|
||||||
if (TCastToPtr<CActor> act = mgr.ObjectById(x10_ownerId)) {
|
|
||||||
|
if (!x12_active) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (const TCastToConstPtr<CActor> act = mgr.ObjectById(x10_ownerId)) {
|
||||||
const CAnimData& animData = *act->GetModelData()->GetAnimationData();
|
const CAnimData& animData = *act->GetModelData()->GetAnimationData();
|
||||||
zeus::CTransform actXf = act->GetTransform();
|
const zeus::CTransform actXf = act->GetTransform();
|
||||||
zeus::CTransform scaleXf = zeus::CTransform::Scale(act->GetModelData()->GetScale());
|
const zeus::CTransform scaleXf = zeus::CTransform::Scale(act->GetModelData()->GetScale());
|
||||||
|
|
||||||
for (const CJointCollisionDescription& jDesc : x0_jointDescriptions) {
|
for (const CJointCollisionDescription& jDesc : x0_jointDescriptions) {
|
||||||
if (TCastToPtr<CCollisionActor> cAct = mgr.ObjectById(jDesc.GetCollisionActorId())) {
|
if (TCastToPtr<CCollisionActor> cAct = mgr.ObjectById(jDesc.GetCollisionActorId())) {
|
||||||
zeus::CTransform pivotXf = GetWRLocatorTransform(animData, jDesc.GetPivotId(), actXf, scaleXf);
|
const zeus::CTransform pivotXf = GetWRLocatorTransform(animData, jDesc.GetPivotId(), actXf, scaleXf);
|
||||||
zeus::CVector3f origin = pivotXf.origin;
|
zeus::CVector3f origin = pivotXf.origin;
|
||||||
|
|
||||||
if (jDesc.GetType() == CJointCollisionDescription::ECollisionType::OBB ||
|
if (jDesc.GetType() == CJointCollisionDescription::ECollisionType::OBB ||
|
||||||
jDesc.GetType() == CJointCollisionDescription::ECollisionType::OBBAutoSize) {
|
jDesc.GetType() == CJointCollisionDescription::ECollisionType::OBBAutoSize) {
|
||||||
if (jDesc.GetOrientationType() == CJointCollisionDescription::EOrientationType::Zero) {
|
if (jDesc.GetOrientationType() == CJointCollisionDescription::EOrientationType::Zero) {
|
||||||
cAct->SetTransform(zeus::CQuaternion(pivotXf.basis).toTransform(cAct->GetTranslation()));
|
cAct->SetTransform(zeus::CQuaternion(pivotXf.basis).toTransform(cAct->GetTranslation()));
|
||||||
} else {
|
} else {
|
||||||
zeus::CTransform nextXf = GetWRLocatorTransform(animData, jDesc.GetNextId(), actXf, scaleXf);
|
const zeus::CTransform nextXf = GetWRLocatorTransform(animData, jDesc.GetNextId(), actXf, scaleXf);
|
||||||
cAct->SetTransform(zeus::CQuaternion(zeus::lookAt(pivotXf.origin, nextXf.origin, pivotXf.basis[2]).basis)
|
cAct->SetTransform(zeus::CQuaternion(zeus::lookAt(pivotXf.origin, nextXf.origin, pivotXf.basis[2]).basis)
|
||||||
.toTransform(cAct->GetTranslation()));
|
.toTransform(cAct->GetTranslation()));
|
||||||
}
|
}
|
||||||
@ -168,13 +201,14 @@ void CCollisionActorManager::Update(float dt, CStateManager& mgr, EUpdateOptions
|
|||||||
if (jDesc.GetOrientationType() == CJointCollisionDescription::EOrientationType::Zero) {
|
if (jDesc.GetOrientationType() == CJointCollisionDescription::EOrientationType::Zero) {
|
||||||
origin += jDesc.GetMaxSeparation() * pivotXf.basis[1];
|
origin += jDesc.GetMaxSeparation() * pivotXf.basis[1];
|
||||||
} else {
|
} else {
|
||||||
zeus::CTransform nextXf = GetWRLocatorTransform(animData, jDesc.GetNextId(), actXf, scaleXf);
|
const zeus::CTransform nextXf = GetWRLocatorTransform(animData, jDesc.GetNextId(), actXf, scaleXf);
|
||||||
origin += zeus::lookAt(origin, nextXf.origin, pivotXf.basis[2]).basis[1] * jDesc.GetMaxSeparation();
|
origin += zeus::lookAt(origin, nextXf.origin, pivotXf.basis[2]).basis[1] * jDesc.GetMaxSeparation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (opts == EUpdateOptions::ObjectSpace)
|
|
||||||
|
if (opts == EUpdateOptions::ObjectSpace) {
|
||||||
cAct->MoveToOR(cAct->GetTransform().transposeRotate(origin - cAct->GetTranslation()), dt);
|
cAct->MoveToOR(cAct->GetTransform().transposeRotate(origin - cAct->GetTranslation()), dt);
|
||||||
else
|
} else {
|
||||||
cAct->SetTranslation(origin);
|
cAct->SetTranslation(origin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -186,7 +220,7 @@ zeus::CTransform CCollisionActorManager::GetWRLocatorTransform(const CAnimData&
|
|||||||
const zeus::CTransform& worldXf,
|
const zeus::CTransform& worldXf,
|
||||||
const zeus::CTransform& localXf) {
|
const zeus::CTransform& localXf) {
|
||||||
zeus::CTransform locXf = animData.GetLocatorTransform(id, nullptr);
|
zeus::CTransform locXf = animData.GetLocatorTransform(id, nullptr);
|
||||||
zeus::CVector3f origin = worldXf * (localXf * locXf.origin);
|
const zeus::CVector3f origin = worldXf * (localXf * locXf.origin);
|
||||||
locXf = worldXf.multiplyIgnoreTranslation(locXf);
|
locXf = worldXf.multiplyIgnoreTranslation(locXf);
|
||||||
locXf.origin = origin;
|
locXf.origin = origin;
|
||||||
return locXf;
|
return locXf;
|
||||||
@ -194,13 +228,14 @@ zeus::CTransform CCollisionActorManager::GetWRLocatorTransform(const CAnimData&
|
|||||||
|
|
||||||
std::optional<zeus::CVector3f> CCollisionActorManager::GetDeviation(const CStateManager& mgr, CSegId seg) {
|
std::optional<zeus::CVector3f> CCollisionActorManager::GetDeviation(const CStateManager& mgr, CSegId seg) {
|
||||||
for (const CJointCollisionDescription& desc : x0_jointDescriptions) {
|
for (const CJointCollisionDescription& desc : x0_jointDescriptions) {
|
||||||
if (desc.GetPivotId() != seg)
|
if (desc.GetPivotId() != seg) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (TCastToConstPtr<CActor> act = mgr.GetObjectById(x10_ownerId)) {
|
if (const TCastToConstPtr<CActor> act = mgr.GetObjectById(x10_ownerId)) {
|
||||||
if (TCastToConstPtr<CCollisionActor> colAct = mgr.GetObjectById(desc.GetCollisionActorId())) {
|
if (const TCastToConstPtr<CCollisionActor> colAct = mgr.GetObjectById(desc.GetCollisionActorId())) {
|
||||||
zeus::CTransform xf = GetWRLocatorTransform(*act->GetModelData()->GetAnimationData(), desc.GetPivotId(),
|
const zeus::CTransform xf =
|
||||||
act->GetTransform(),
|
GetWRLocatorTransform(*act->GetModelData()->GetAnimationData(), desc.GetPivotId(), act->GetTransform(),
|
||||||
zeus::CTransform::Scale(act->GetModelData()->GetScale()));
|
zeus::CTransform::Scale(act->GetModelData()->GetScale()));
|
||||||
|
|
||||||
return {colAct->GetTranslation() - xf.origin};
|
return {colAct->GetTranslation() - xf.origin};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user