7erra 629 Posted August 5, 2018 Hi everyone! So I'm trying to get the relative offset of an object to use it for the attachTo command. You can return the relative model position with TER_3den_baseObject worldToModel (TER_3den_attachObject modelToWorld [0,0,0]) But how does it work together with a selectionPosition? Here is a graphic demonstrating the problem: Share this post Link to post Share on other sites
Sgt. Dennenboom 98 Posted August 5, 2018 The vector from "selectionPosition" to "worldToModel" is the difference between them: For example: _attachPoint = OBJECT selectionPosition "SELECTION"; // Vector from OBJECT center to selectionPoint _worldToModel = OBJECT worldToModel(ATTACHMENT modelToWorld [0,0,0]); // Vector from OBJECT center to ATTACHMENT center _offsetFromSelection = _worldToModel vectorDiff _attachPoint; // Vector from selectionPoint to ATTACHMENT center 1 1 Share this post Link to post Share on other sites