New answers tagged


I figured this problem out a little while ago. Trick is to just use polar equations for the orbit motion. Does the job perfectly, though I still do not know exactly why the cartesian equation did not work. Anyway, thanks Urist for your response.


My hybrid solution works! The gimbal lock was still there because I had a rotation lag on the CameraSpringArm, which does not support 6 DoF. Removing the camera lag (CameraSpringArm->bEnableCameraRotationLag = false;) solved the problem.


A much simpler approach to this would be to use vector math. I'm assuming you're trying to get the closest point to the mouse on the outer sphere. All you really have to do is get the vector from your center point to the mouse point, normalize, and then multiply by the radius of your sphere. screenpos = Camera.main.ScreenToWorldPoint (Input.mousePosition); ...

Top 50 recent answers are included