WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Setting the origin of a object to an object's center (https://forum.worldviz.com/showthread.php?t=3820)

Aweless 06-27-2011 11:35 AM

Setting the origin of a object to an object's center
 
1 Attachment(s)
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 :)


All times are GMT -7. The time now is 04:59 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC