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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 11th September 2007, 11:08 PM   #1
conzar
Member
Advanced member
 
conzar's Avatar
 
Join Date: May 2006
Posts: 36
Question How to move an object to the origin and back

Hello. I would like to know how to move an object to the origin and then back to its original location. I've tried the code that is below; however, when the function exits, the object is left at the origin.

Code:
   ACObject *obj = ... get from somewhere

   // get the center of the object
   Point3 *centre = ac_object_get_centre(obj);
    // move it to the origin
    translate_object_zero(obj);
    // do something useful here 
 
    // move it back
    translate_object(obj,centre);
I've also tried translate_object_abs and get the same results.

Anyone know what I'm doing wrong?

Using AC3D 6.2.05 linux version.
conzar is offline   Reply With Quote
 

Thread Tools
Display Modes

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 10:36 AM.


AC3D Forum
(C) Inivis Limited 2020