View Full Version : Rotating about an object
How can I make a sphere rotate around another sphere? Thanks!
06-01-2003, 11:12 AM
first, move the sphere's center to the origin (that's the sphere that you want to rotate around, not the sphere that you want to rotate), then do your rotation, then translate back to get the sphere's center in its original location. in pseudocode, that would look something like the following:
Vector3 SphereCenter; //set to the appropriate value
//remember that in gl transformations are done in the opposite order that you specify them
[This message has been edited by SThomas (edited 06-01-2003).]
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.