Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Finding an objects origin

Author
Message
GWL
13
Years of Service
User Offline
Joined: 2nd Jan 2011
Location:
Posted: 13th Feb 2011 06:24
Hello,

Is there a way to find an object's origin (local x,y,z) when its off center, relative to the size of the object? In the following diagram, I want to be able to find the widths of A & B for different objects whose origins dynamically change(they are purposely off center).



Of course I can get the total size of the object [object size x] and I can get the world position of the origin [object position x], but I need to be able to find out the size of the object on each side of its origin. Hope that made sense. Any advice would be appreciated. Thanks.
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 13th Feb 2011 11:50
If speed is not an issue, then you can always lock the vertex data of the limb and use the vertex data commands to get the position of the vertices (or loop through all limbs if you need all vertices) and find the max/min. The positions of the vertices are relative to their limb origin.

If speed is an issue, then it might be better to dynamically change the sizes along with your object without actually locking the vertex data.

Sven B

GWL
13
Years of Service
User Offline
Joined: 2nd Jan 2011
Location:
Posted: 14th Feb 2011 02:57
Quote: "If speed is not an issue, then you can always lock the vertex data of the limb and use the vertex data commands to get the position of the vertices (or loop through all limbs if you need all vertices) and find the max/min. The positions of the vertices are relative to their limb origin."


Great suggestion! That makes a lot of sense. I'll give it a try.

Thanks

Login to post a reply

Server time is: 2024-11-26 18:02:39
Your offset time is: 2024-11-26 18:02:39