Hi First sorry for my english. I'm a Portuguese student and I'm developing a
project for my graduation, it consist on a virtual visit on the school. We are
using openSg to do it and have some problems with the navigator. We had design
all scene in 3ds Max, and import it to openSg with a .bin file. When I develop
the walkNavigator with only a Torus on the screen it work´s perfectly, but when
I draw the all scene it doesn't work. With the torus when I press and leave the
key down the navigator walk forward correctly, but with the all scene (with the
bin file) he just move forward when I drop the key, and the jump is
proportional to the time that the key is pressed. I want to control the
navigator with keyboard so I made the following function: void teclado(unsigned
char k, int x, int y){ if((GetKeyState('W') &
0x80)){mNavigator.getWalkNavigator()->forward(-0.5);mNavigator.updateCameraTransformation();}
if((GetKeyState('S') &
0x80)){mNavigator.getWalkNavigator()->forward(0.5);mNavigator.updateCameraTransformation();}
if((GetKeyState('A') &
0x80)){mNavigator.getWalkNavigator()->right(0.5);mNavigator.updateCameraTransformation();}
if((GetKeyState('D') &
0x80)){mNavigator.getWalkNavigator()->right(-0.5);mNavigator.updateCameraTransformation();}
if((GetKeyState('O') & 0x80)){mNavigator.getWalkNavigator()->rotate(0.03f,
0.0f);mNavigator.updateCameraTransformation();} if((GetKeyState('I') &
0x80)){mNavigator.getWalkNavigator()->rotate(-0.03f,
0.0f);mNavigator.updateCameraTransformation();} This function is called on the
SetupGlut func : glutKeyboardFunc(teclado); Thank's Regards Telmo Nobre
_________________________________________________________________
Instale a Barra de Ferramentas com Desktop Search e ganhe EMOTICONS para o
Messenger! É GRÁTIS!
http://www.msn.com.br/emoticonpack-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users