Jump to content

similar effect like look up constraint


Recommended Posts

hi guys

 

is there a way in vex to make the bee always face towards the target no matter where the target go? 

 

i found a similar script but is the normal point towards the target, is there any similar script or method so whenever the bee fly into different direction or where ever the target go, the head of the bee will still be facing towards the target?

 

Thank you very much!

Bee.PNG

Bee2.PNG

Link to comment
Share on other sites

By default a copy to points node will orient the bee's to the normal direction of the point onto which they're copied. 

If instead using vex to first define the location of the bee( as in it doesn't exist otherwise) and the bee is then generated in that position, the orientation towards the target is mathematically rotating each bee by a 3X3 matrix. If you generate them in that position, you would need to use a for loop to rotate each bee individually after the fact which is probably too slow depending on how many bee's you have there. 

Instead, generate the bee at that origin then position it afterwards by multiplying it by a 4 x 4 matrix where the position of the matrix is the position you generated before and the rotation vectors are the 3 angles between each respective x y z orientation vectors. 

Watching this video series if you're unfamiliar with vector math will help immensely. 

 

Edited by Feather
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...