I've currently got it set up so that I can move a unit in the direction of the camera and would like to be able to change the direction of the camera by right clicking and dragging the mouse. I am able to do this with the CameraSetMouseRotates and CameraForceMouseRelative functions but like this there is no limit to camera pitch allowing the user to position the camera below the ground as seen here: http://i39.tinypic.com/2lxjv35.png|
I am able to crudely code in restrictions by constantly checking and resetting the pitch. Like this, if the user attempts to go past the limit slowly they'll get a shakey camera and if they try quickly they will break through the limit for a fraction of a second showing what is in the image above. Overall it just doesn't look very good.
So is there any way to go about fixing this? I've looked around and there doesn't seem to be any camera options for this or any way to get the x/y coordinates of the mouse; so I'm stumped.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I've currently got it set up so that I can move a unit in the direction of the camera and would like to be able to change the direction of the camera by right clicking and dragging the mouse. I am able to do this with the CameraSetMouseRotates and CameraForceMouseRelative functions but like this there is no limit to camera pitch allowing the user to position the camera below the ground as seen here: http://i39.tinypic.com/2lxjv35.png|
I am able to crudely code in restrictions by constantly checking and resetting the pitch. Like this, if the user attempts to go past the limit slowly they'll get a shakey camera and if they try quickly they will break through the limit for a fraction of a second showing what is in the image above. Overall it just doesn't look very good.
So is there any way to go about fixing this? I've looked around and there doesn't seem to be any camera options for this or any way to get the x/y coordinates of the mouse; so I'm stumped.