Game Development Community

Crouch and prone blues

by Danni · in Torque Game Engine · 01/23/2007 (7:19 pm) · 1 replies

I am using TSE 1.0 and have the same problem that the camera does not follow the eye position with the animations when using the code and animations from http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4348 . I can crouch and prone and see in third person it has succeeded but first person the camera stays the same height and the weapon models disappear unless i look down.

Turning renderFirstPerson = true showed something interesting. It seams when i crouch and look down, i see the feet tuck up but the player remains in position, prone appears as if the client is standing.

I have also traced the function and watched the bounding box dimensions change so I am guessing the eye z position is locked somewhere and the player is floating? Muzzle points are also locked, if i fire the projectiles spawn from the same height in all three positions.

I have searched and read every resource on this issue and nothing has helped.

What the heck!? Anyone have any ideas what is wrong?

#1
02/18/2007 (5:16 pm)
void Player::updateAnimation(F32 dt)
{
   if ((isGhost() || mActionAnimation.animateOnServer) && mActionAnimation.thread)
      mShapeInstance->advanceTime(dt,mActionAnimation.thread);
   if (mRecoilThread)
      mShapeInstance->advanceTime(dt,mRecoilThread);

   // If we are the client's player on this machine, then we need
   // to make sure the transforms are up to date as they are used
   // to setup the camera.
   if (isGhost())
   {
      /*if (getControllingClient())
      {
         updateAnimationTree(isFirstPerson());
         mShapeInstance->animate();
      }
      else
      {
         updateAnimationTree(false);
      }*/
	   updateAnimationTree(false); // [Danni] Was here
	   mShapeInstance->animate();
   }
}

The above hack fixed it.