How to limit mouse movement?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
ffiorenzano
Posts: 1
Joined: Tue Oct 12, 2004 11:23 am

How to limit mouse movement?

Post by ffiorenzano »

First of all, sorry for my bad english, i am Italian...

Using the FPS camera, how to limit the vertical movement of the mouse?
I have a skybox without Top and Down, and I want to hide them...

Thanks
F.Fiorenzano
spsteam
Posts: 9
Joined: Mon Oct 04, 2004 8:52 am
Location: Spain
Contact:

Post by spsteam »

try this: in your main loop put this(It's only an algorithm, don't C code, I don't try if it compiles)

vector3df rot;

rot = camera->getRotation();
if (rot.X>limitUpperX)
camera->setRotation(limitUpperX,rot.Y,rot.Z);
if (rot.X<limitBottomX)
camera->setRotation(limitBottomX,rot.Y,rot.Z);
---------------------------------------------
http://usuarios.lycos.es/spsteam/
Post Reply