View Full Version : rotation question
05-17-2004, 04:59 PM
How do I rotate about an object while keeping it in view? That is, rotating around an object while still keeping the object in sight and still having the same distance.
05-17-2004, 10:15 PM
A "look-at" function is what you're looking for. gluLookAt() is a start. However there are more robust functions that'll let you actually orbit object A around object B while keeping object A facing object B. Check Google for this.
05-18-2004, 08:01 AM
Rotate the object in object space, ie. first do the rotation around it's center (usually that's the origin of objects, if not you need to move it there, rotate and move it back) and only after that move it to it's world position.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.