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.