Jump to content

Vex - matching target position in DOPs


Juraj

Recommended Posts

Hi

I am trying to dive into VEX. And I made up a little assigment for myself - do an assemble effect in DOPs.

However when matching target position and orientation there is a slight offset occuring in orientation. (img_1)

But if I do this position and orientation adjusting (same method) based on simpler rule (frame number) it works as expected. (img_2)

 

Could somebody look into this file and check what may cause this problem?

 

Thanks,

Juraj

project.hipnc

post-11577-0-76679400-1444081889_thumb.j

post-11577-0-56963200-1444081892_thumb.j

Link to comment
Share on other sites

matching transforms is not enough, you need to match pivots as well

so just insert this code somewhere after you populate align variable

...
vector pivot = primintrinsic(0, "pivot", @primnum);
vector pivottgt = primintrinsic(1, "pivot", @primnum);
pivot = lerp(pivot, pivottgt, align);
setprimintrinsic(0, "pivot", @primnum, pivot);
...
Link to comment
Share on other sites

Awesome!

Now it works, thank you.

 

However I am not sure I understand this pivot thing. How is intrinsic "packedfulltransform" computed? Is it computed by attribute @P, "transform" intrinsic and "pivot" intrinsic? What role does "pivot" intrinsic play in bullet sim? And why is it changing during simulation? Isn't pivot of transformation encoded into "transform" intrinsic matrix?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...