cruzdanilo
07-07-2007 20:55:18
I was having some trouble with the addMovement method of the Character class, and reading the code i've found an error
How can Forward be negative X if positive Y is up and postive Z is right???
I think forward should be positive X
If i'm wrong, please somebody explain me this.
Thanks
void Character::addMovement(Direction m) {
if (mUpAxis == NX_Y) {
switch (m) {
case DR_Forward:
mNextMovementDirection -= NxVec3Axis[NX_X];
return;
break;
case DR_Backward:
mNextMovementDirection += NxVec3Axis[NX_X];
return;
break;
case DR_StepLeft:
mNextMovementDirection -= NxVec3Axis[NX_Z];
return;
break;
case DR_StepRight:
mNextMovementDirection += NxVec3Axis[NX_Z];
return;
break;
case DR_Jump_Up:
// jump inject code
mNextMovementDirection.zero();
// jump timer++
// pass jump timer onto move bit as well.
break;
case DR_Ladder_Up:
mNextMovementDirection += NxVec3Axis[NX_Y];
return;
break;
case DR_Ladder_Down:
mNextMovementDirection -= NxVec3Axis[NX_Y];
return;
break;
}
return;
}
else if (mUpAxis == NX_X) {
// TODO
}
else if (mUpAxis == NX_Z) {
// TODO
}
}
How can Forward be negative X if positive Y is up and postive Z is right???
I think forward should be positive X
If i'm wrong, please somebody explain me this.
Thanks