![]() |
|
#4
|
|||
|
|||
Hi Max,
Try using the following code to set the center of an object without affecting its translation: Code:
oldpos = obj1.get(viz.POSITION,viz.ABSOLUTE_WORLD) obj1.center(-1,0,-1) newpos = obj1.get(viz.POSITION,viz.ABSOLUTE_WORLD) obj1.translate(oldpos[0]-newpos[0],oldpos[1]-newpos[1],oldpos[2]-newpos[2],viz.RELATIVE_WORLD) |
|
|