12th September 2007, 10:46 PM | #4 |
Senior Member
Professional user
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
|
Re: How to move an object to the origin and back
When you get the pointer to the center, you're storing the address of the memory where the data is located, not the data itself. When AC3D moves the object, then center moves too, of course. If you're looking the center up through the pointer, you'll get the *new* location of the center because the data at that address has changed--which isn't what you want.
By de-referencing, you cause your code to store a *copy* of the center location, meaning the number won't change no matter how much you move the object. |
|
|