Game Development Community

Is there a way to disable the X and Y on the mouse

by Kory Imaginism · in Torque 3D Professional · 09/24/2013 (11:39 am) · 5 replies

I was wondering if there is a way to disable the mouse from controlling the X and Y movement of the camera, or lock it to the players head movement?

Thanks

#1
09/24/2013 (11:41 am)
You should be able to accomplish this by messing around with Player::updateMove(). Just remember if you add any flag variables that they also need to be added to pack/unpack.
#2
09/24/2013 (1:15 pm)
Would that be found in script or source?
#3
09/24/2013 (9:36 pm)
In scripts\client\default.binds.cs around line 250 there is:
moveMap.bind( mouse, xaxis, yaw );
moveMap.bind( mouse, yaxis, pitch );
If you comment out these lines the mouse will not pitch or yaw the player or camera.

This means you wont be using the mouse for any movement at all though.
#4
09/25/2013 (2:44 pm)
Thanks, I'll have to check it out once I get home. Is there a way to still keep movement but limit it?
#5
09/25/2013 (3:25 pm)
why not just go in functions yaw and pitch, do something like this:

if ($disabledCamera) return;

wouldn't even need an engine change :P