Hello! Such problem! In the menu of game I put
scene:: ISceneManager* sm = device-> getSceneManager ();
sm-> setActiveCamera (sm-> addCameraSceneNode (0, core:: vector3df (45,0,0), core:: vector3df (0,0,10)));
The cursor goes normally.
Then after the beginning of new game I put
camera = sm-> addCameraSceneNodeFPS (0, 0.0f, 0.0f,-1, keyMap, 8, true);
(zero in speeds of displacement and turn cost{stand} because my game does not demand work with them)
sm-> setActiveCamera (camera);
Then when I leave in the menu with help Esc I again I put
sm-> setActiveCamera (sm-> addCameraSceneNode (0, core:: vector3df (45,0,0), core:: vector3df (0,0,10)));
But the cursor jams in the middle of the screen and is not shifted. Why so occurs?
Cursor problem
Re: Cursor problem
1. you should not create a new camera each time escape was pressed !!!Eugenik wrote:Then when I leave in the menu with help Esc I again I put
sm-> setActiveCamera (sm-> addCameraSceneNode (0, core:: vector3df (45,0,0), core:: vector3df (0,0,10)));
But the cursor jams in the middle of the screen and is not shifted. Why so occurs?
In extreme you could get 100s of cameras in your scene !!!
Then, what do you ean with jams and is not shifted ???
The cursor jumps to the center of the screen because the fps cam works this way, it counts the difference between the actual cursor position and the center and resets the cursor to the center...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java