ColeZero
04-06-2006 16:05:06
So i have switched my inputs to buffered inputs...
I've added character to the scene and know there are some poblems to controll the character.
Create Character:
Move Character
i thougt that the move is called as long as i press the key, but it doesn't.
i have to press repeatly to move the character forward or backward....
what is wrong?
And so there is another problem with my shootBall Method, so the orientation is wrong with a character:
its hard to explain but the ball is shooting only on the right-side of the scene.
when i look to the left side of the scene, the ball is shoot to mid of the scene i've made screens to show you what i mean.
Here iam look to the right side:the red crosshair is where im looking at,
so on this screen is everything fine:
So this is a screen from the left side, the same here crosshair is where iam looking at but the ball is shooting to mid of the scene:
Hoping you know what i mean..
I've added character to the scene and know there are some poblems to controll the character.
Create Character:
mPlayer = mScene->createCharacter("Player","",Vector3(10,1,0),Vector3(0.3,1.8,0.3));
mPlayer->mNode->attachObject(mCamera);
mCamera->setPosition(Vector3(0,1.75,0));
Move Character
void OgreNXApp::keyPressed(KeyEvent* e)
{
if(e->getKey() == KC_W)
mPlayer->move(nxOgre::character::FORWARD);
}
i thougt that the move is called as long as i press the key, but it doesn't.
i have to press repeatly to move the character forward or backward....
what is wrong?
And so there is another problem with my shootBall Method, so the orientation is wrong with a character:
void OgreNXApp::ShootBall(void)
{
Vector3 dir, vec;
Quaternion orient = mCamera->getOrientation(); //getWorldOrientation() seems not to work
Vector3 pos = mCamera->getWorldPosition(); //same here getWorldPosition() do not work, don't know
vec = Vector3(0,0,-1);
dir = orient * vec;
...
its hard to explain but the ball is shooting only on the right-side of the scene.
when i look to the left side of the scene, the ball is shoot to mid of the scene i've made screens to show you what i mean.
Here iam look to the right side:the red crosshair is where im looking at,
so on this screen is everything fine:
So this is a screen from the left side, the same here crosshair is where iam looking at but the ball is shooting to mid of the scene:
Hoping you know what i mean..