justinngjw Posted February 3, 2020 Share Posted February 3, 2020 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! Quote Link to comment Share on other sites More sharing options...
Feather Posted February 7, 2020 Share Posted February 7, 2020 (edited) 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 February 7, 2020 by Feather 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.