- Home /
Question by
andrewmanq · Aug 24, 2015 at 11:28 AM ·
camerarotationcamera-movementraycastingrotation axis
How do I get my camera to rotate around the y=0 coordinate it's looking at?
OK; here's the situation. The anno-like city builder I'm working on has a flat ground at 0,0. I'm trying to get the camera to rotate around a fixed point, which should be in front the the center of the camera and stops at 0,0. I've tried many teqniques with JavaScript, including using the tangent of the height of the camera to place an empty object at the right point where I can rotate around it (with transform.rotatearound). No luck. There's got to be an easier answer to this. Maybe something with raycast?
Comment
@andrewmanq can you be more specific on what you ask. do you want the camera to rotate on its axis to see around it 360. or rotate around a specific xyz, pointing at this point.