Jump to content
enda

vex function

Recommended Posts

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?

 

 

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×