@@ -2538,58 +2538,17 @@ void ACrab::Update()
2538
2538
deltaTime);
2539
2539
2540
2540
}
2541
- }
2542
- // Not stable/standing, so make sure the end of limbs are moving around limply in a ragdoll fashion
2543
- else
2544
- {
2545
- // TODO: Make the limb atom groups fly around and react to terrain, without getting stuck etc
2546
- bool wrapped = false ;
2547
- Vector limbPos;
2548
- if (m_pLFGLeg)
2549
- {
2550
- // m_pLFGFootGroup->SetLimbPos(m_pLFGLeg->GetAnklePos(), m_HFlipped);
2551
- m_pLFGFootGroup->FlailAsLimb (m_Pos,
2552
- m_pLFGLeg->GetParentOffset ().GetXFlipped (m_HFlipped) * m_Rotation,
2553
- m_pLFGLeg->GetMaxLength (),
2554
- g_SceneMan.GetGlobalAcc () * g_TimerMan.GetDeltaTimeSecs (),
2555
- m_AngularVel,
2556
- m_pLFGLeg->GetMass (),
2557
- g_TimerMan.GetDeltaTimeSecs ());
2558
- }
2559
- if (m_pLBGLeg)
2560
- {
2561
- // m_pLBGFootGroup->SetLimbPos(m_pLBGLeg->GetAnklePos(), m_HFlipped);
2562
- m_pLBGFootGroup->FlailAsLimb (m_Pos,
2563
- m_pLBGLeg->GetParentOffset ().GetXFlipped (m_HFlipped) * m_Rotation,
2564
- m_pLBGLeg->GetMaxLength (),
2565
- g_SceneMan.GetGlobalAcc () * g_TimerMan.GetDeltaTimeSecs (),
2566
- m_AngularVel,
2567
- m_pLBGLeg->GetMass (),
2568
- g_TimerMan.GetDeltaTimeSecs ());
2569
- }
2570
- if (m_pRFGLeg)
2571
- {
2572
- // m_pRFGFootGroup->SetLimbPos(m_pRFGLeg->GetAnklePos(), m_HFlipped);
2573
- m_pRFGFootGroup->FlailAsLimb (m_Pos,
2574
- m_pRFGLeg->GetParentOffset ().GetXFlipped (m_HFlipped) * m_Rotation,
2575
- m_pRFGLeg->GetMaxLength (),
2576
- g_SceneMan.GetGlobalAcc () * g_TimerMan.GetDeltaTimeSecs (),
2577
- m_AngularVel,
2578
- m_pRFGLeg->GetMass (),
2579
- g_TimerMan.GetDeltaTimeSecs ());
2580
- }
2581
- if (m_pRBGLeg)
2582
- {
2583
- // m_pRBGFootGroup->SetLimbPos(m_pRBGLeg->GetAnklePos(), m_HFlipped);
2584
- m_pRBGFootGroup->FlailAsLimb (m_Pos,
2585
- m_pRBGLeg->GetParentOffset ().GetXFlipped (m_HFlipped) * m_Rotation,
2586
- m_pRBGLeg->GetMaxLength (),
2587
- g_SceneMan.GetGlobalAcc () * g_TimerMan.GetDeltaTimeSecs (),
2588
- m_AngularVel,
2589
- m_pRBGLeg->GetMass (),
2590
- g_TimerMan.GetDeltaTimeSecs ());
2591
- }
2592
- }
2541
+ } else {
2542
+ // Not stable/standing, so make sure the end of limbs are moving around limply in a ragdoll fashion.
2543
+ // TODO: Make the limb atom groups fly around and react to terrain, without getting stuck etc.
2544
+ if (m_pLFGLeg) { m_pLFGFootGroup->FlailAsLimb (m_Pos, RotateOffset (m_pLFGLeg->GetParentOffset ()), m_pLFGLeg->GetMaxLength (), m_PrevVel * m_pLFGLeg->GetJointStiffness (), m_AngularVel, m_pLFGLeg->GetMass (), deltaTime); }
2545
+
2546
+ if (m_pLBGLeg) { m_pLBGFootGroup->FlailAsLimb (m_Pos, RotateOffset (m_pLBGLeg->GetParentOffset ()), m_pLBGLeg->GetMaxLength (), m_PrevVel * m_pLBGLeg->GetJointStiffness (), m_AngularVel, m_pLBGLeg->GetMass (), deltaTime); }
2547
+
2548
+ if (m_pRFGLeg) { m_pRFGFootGroup->FlailAsLimb (m_Pos, RotateOffset (m_pRFGLeg->GetParentOffset ()), m_pRFGLeg->GetMaxLength (), m_PrevVel * m_pRFGLeg->GetJointStiffness (), m_AngularVel, m_pRFGLeg->GetMass (), deltaTime); }
2549
+
2550
+ if (m_pRBGLeg) { m_pRBGFootGroup->FlailAsLimb (m_Pos, RotateOffset (m_pRBGLeg->GetParentOffset ()), m_pRBGLeg->GetMaxLength (), m_PrevVel * m_pRBGLeg->GetJointStiffness (), m_AngularVel, m_pRBGLeg->GetMass (), deltaTime); }
2551
+ }
2593
2552
2594
2553
// ///////////////////////////////
2595
2554
// Manage Attachable:s
0 commit comments