Game Development Community

a workabout for the swimming animations problem

by deepscratch · in Torque 3D Professional · 05/31/2009 (10:22 am) · 1 replies

ok, found a workabout for the swimming animation problem described here
in player.cpp, change this
else if ( mSwimming )
   {
      action = PlayerData::SwimRootAnim;
to this
else if ( mSwimming )
   {
      action = (mVelocity.len() < 0.5) ? PlayerData::SwimRootAnim : PlayerData::SwimForwardAnim;
remember, youll need a swim root anim and a swim forward anim for this to work.

#1
09/16/2009 (8:16 am)
player.h file add this code :)

{ "swim_forward", { 0.0f, 1.0f, 0.0f } },
   { "swim_backward", { 0.0f, -1.0f, 0.0f } },
   { "swim_left", { -1.0f, 0.0f, 0.0f } },
   { "swim_right", { 1.0f, 0.0f, 0.0f } },