Exit orbit mode in the same place
by Rex Hiebert · in Torque 3D Professional · 10/08/2009 (1:55 pm) · 0 replies
My project uses an RTS style camera that floats above the scene. There are times when I want to orbit an object. I have that working but whenever I switch back to fly mode the camera is placed at the point that it was looking at which is usually inside an object.
Is there a way to get the transform (position and rotation) of the camera when it is in orbit mode and set the camera to that same transform in another mode? When you call getTransform() on the camera while in orbit mode, it returns the transform of the point it is looking at and not where it is. Is there a way to do this?
Is there a way to get the transform (position and rotation) of the camera when it is in orbit mode and set the camera to that same transform in another mode? When you call getTransform() on the camera while in orbit mode, it returns the transform of the point it is looking at and not where it is. Is there a way to do this?