Go Back   AC3D Forums > Technical > AC3D Developers
Register FAQ Members List Calendar Today's Posts

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 12th September 2007, 10:46 PM   #4
lisa
Senior Member
Professional user
 
lisa's Avatar
 
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
Default 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.
lisa is offline   Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 01:23 PM.


AC3D Forum
(C) Inivis Limited 2020