planB
20-09-2010 01:55:58
hi, there!
i have render the animited character to the ogre. but there are some problem with the move and turn.
how could i get the value of normalised_movement_vector in the move funtion.
my keypress is below,
so how can i get the value to move the character ahead (not move to only two strange direction as i did now),
i have render the animited character to the ogre. but there are some problem with the move and turn.
how could i get the value of normalised_movement_vector in the move funtion.
my keypress is below,
bool test_character::keyPressed( const OIS::KeyEvent &evt )
{
switch(evt.key)
{
case OIS::KC_UP:
case OIS::KC_K:
mDirection.z -= 1;
break;
case OIS::KC_DOWN:
case OIS::KC_L:
mDirection.z +=1;
break;
case OIS::KC_LEFT:
case OIS::KC_I:
mRotation = 3.5f;
break;
case OIS::KC_RIGHT:
case OIS::KC_M:
mRotation = -3.5f;
break;
}
return BaseApplication::keyPressed(evt);
}
so how can i get the value to move the character ahead (not move to only two strange direction as i did now),
mcharacter->move(????);