PDA

View Full Version : Setting the origin of a object to an object's center


Aweless
06-27-2011, 11:35 AM
In short I've loaded a square into vizard (.dae). The square's origin is not in the center of the square, but in it's top left hand corner. This is because of when it was exported that corner of the square was at the origin of the viewport. Is there a way for me to determine the center of the square in vizard and relocate it's origin to it's center? Pretty I just to fix this so when I move or rotate the object it move with respect to it's center.


I included a jpg displaying my problem. I am aware if I re-export the square realigned it will fix the problem, but I can't for various reasons.:confused:

sleiN13
06-28-2011, 12:57 AM
If it is a square alignes with the axis getBoundingBox() might do.

Just get the box.size and do a translation of half the width, height and depth and you should be oke :)