Fixed skeleton raycasting using the incorrect bone position + renamed a variable
This commit is contained in:
parent
59d8de0f31
commit
c4268746f2
|
@ -72,7 +72,7 @@ public:
|
|||
void RenderBuckets(const SViewInfo& rkViewInfo);
|
||||
void RenderBloom();
|
||||
void RenderSky(CModel *pSkyboxModel, const SViewInfo& rkViewInfo);
|
||||
void AddMesh(IRenderable *pRenderable, int AssetID, const CAABox& rkAABox, bool Transparent, ERenderCommand Command, EDepthGroup DepthGroup = eMidground);
|
||||
void AddMesh(IRenderable *pRenderable, int ComponentIndex, const CAABox& rkAABox, bool Transparent, ERenderCommand Command, EDepthGroup DepthGroup = eMidground);
|
||||
void BeginFrame();
|
||||
void EndFrame();
|
||||
void ClearDepthBuffer();
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue