Geometric center of an object: Difference between revisions
link to Object
(Transferred the page from the old wiki) |
(link to Object) Tags: Mobile edit Mobile web edit Advanced mobile edit |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
When you get the position of an object, you actually get the position of the object's <i>center of mass</i>. | When you get the position of an [[object]], you actually get the position of the object's <i>center of mass</i>. | ||
[[File:Center of mass opaque.png|thumb|right|Center of mass]] | [[File:Center of mass opaque.png|thumb|right|Center of mass]] | ||
| Line 20: | Line 20: | ||
In the next section, the object pointed to by <code>Obj</code> is set to the desired geometric position (<code>1,1,1</code>) subtracted by <code>Offset</code>. | In the next section, the object pointed to by <code>Obj</code> is set to the desired geometric position (<code>1,1,1</code>) subtracted by <code>Offset</code>. | ||
In the section after, the object's new position is then queried, and added to the offset to produce the geometric position of the object. | In the section after, the object's new position is then queried, and added to the offset to produce the geometric position of the object. | ||
[[Category:Scripting]] | |||