Using setRawNextMovementDirection in the y direction

jchmack

10-01-2008 11:26:09

Ok i am trying to get my character to float around.

I can get my character to move along the x/z plane fine like this:


case ForwardRight:
mCharacter->setRawNextMovementDirection(NxVec3(Cos45,0,-Cos45) * CalculatedMovespeed);
break;


but if i try to get him to move upwards like:


if(Jumping==true)
{
cout << "Jumping" << endl;
mCharacter->setRawNextMovementDirection(NxVec3(0,1,0) * CalculatedMovespeed);
//mCharacter->addMovement(Character::DR_Jump_Up);
}


setRawNextMovementDirection doesn't seem to move my character. Any idea why?

I am using:

NxOgre (NxOgre 0.9-38) Started, working with:

- PhysX => 2.7.2
- Ogre => 1.4.5 'Eihort'
- Platform => Windows

all help is appreciated =)

betajaen

10-01-2008 11:35:43

Hmm. Perhaps the jump is nullified by gravity. Are you using a custom character movement controller or the default one?

jchmack

10-01-2008 11:49:56

well i tried a higher value than 1 for my upward movement and it works. I could have swore that i tried this earlier. I think i wasn't calling the function every frame back then though. Thanks a lot Betajaen =).

on a side note i remember back in 0.6 you had a jump that seemed to work like i wanted.

mCharacter->addMovement(Character::DR_Jump_Up);

was something wrong with that? why did u take it out?

meanwhile I am going to look at the 0.6 code for reference.

thx again =)