enda Posted October 9, 2020 Share Posted October 9, 2020 Hello, How can I write the following functions in VEX? There are two box objects in different positions. How do I get a matrix that can move the first object to the second object? Quote Link to comment Share on other sites More sharing options...
aaronsmith93 Posted October 10, 2020 Share Posted October 10, 2020 Hello enda, In order to move your box from one position to another, you need to multiply the current box' inverse matrix by the resulting box matrix. matrix box1_xform = optransform("/obj/box1"); matrix box2_xform = optransform("/obj/box2"); matrix xform = invert(box2_xform)*box1_xform; // Moves box2 position to box1 @P *= xform; It is explained somewhat better here. Hope this helps Quote Link to comment Share on other sites More sharing options...
enda Posted October 12, 2020 Author Share Posted October 12, 2020 Thank you very much. It was very helpful. However, it cannot be used if the geometry node has no movement value, so When I searched for another method, I was able to know the following method. https://vimeo.com/284712920 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.