Posted May 10, 201510 yr I have some projectiles that I want to fire all at once. I want one to fire straight and the others to fire at angles from the player. I'm assuming I should use vectors to calculate these angles but I'm not sure what I do with those vectors (exactly) to rotate them so my projectiles can fire. How would I do this? Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.
May 10, 201510 yr Basically, you copy the standard EntityThrowable constructor code, and add or subtract from the player's rotationYaw whatever amount you desire before you calculate the rest of the variables for the heading. Pretty simple, really http://i.imgur.com/NdrFdld.png[/img]
May 10, 201510 yr Vec3 class has methods for rotation. rotateAroundX(), rotateAroundY(), rotateAroundZ(). You can take the look vector of the entity and do these rotations on that. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
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.