Hi everyone,
I am using the MouseOrbit Script to orbit a camera around an object. The object is in the origin (0,0,0).
I have limit the camera movement in the Y axis, so the camera never flies under the floor. I mean, I have put yMinLimit=0
With this restriction we can say that the camera flying area is a semi-sphere.
my problem is that I need to restrict the camera movement more :). I need that the camera flying area would be the half of that semi-sphere. So I have tried to limit the camera movement in the X axis.
I have tried to add xMinLimit and xMaxLimit variables and also call the function ClampAngle(x, xMinLimit, xMaxLimit) but it only works when I move the camera to the “right”. The camera stops when it would fly to the “other” half of the semi-sphere (I hope you can understand my explanation :))
but if I move to the “left”, when the camera reachs to the limit it cross to the other side.
I think that im near to the solution but I need a bit of help. Can anyone help me?
thank you!
igorlean