mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-21 02:39:17 +00:00
Fixed skeleton raycasting using the incorrect bone position + renamed a variable
This commit is contained in:
@@ -123,7 +123,7 @@ std::pair<s32,float> CSkeleton::RayIntersect(const CRay& rkRay, const CBoneTrans
|
||||
for (u32 iBone = 0; iBone < mBones.size(); iBone++)
|
||||
{
|
||||
CBone *pBone = mBones[iBone];
|
||||
CVector3f BonePos = rkData[pBone->ID()].ExtractTranslation();
|
||||
CVector3f BonePos = pBone->TransformedPosition(rkData);
|
||||
std::pair<bool,float> Intersect = Math::RaySphereIntersection(rkRay, BonePos, skSphereRadius);
|
||||
|
||||
if (Intersect.first && Intersect.second < Out.second)
|
||||
|
||||
Reference in New Issue
Block a user