Started by
a guy called l…
on
Topic category: Help with Minecraft modding (Java Edition)
I want to make a proyectile that, when detect a non-player entity on a range, changes is direction to it one time
I got everthing excepting how to convert the X, Y and Z of the targeted entity on a direction change
for detect a non-player entity, I just make
if: entity = player
do: drop air
if not do
But I dont get how to make it change it direction to a mob
also dont know how to use vector movement with looking direction, that maybe can be the solution
In reality, it's an homing rocket !?
I fink it's effectly a vector question. I search if it's possible to take the angle between a vector bullet-target and another bullet-bullet+100. I haven't learn about vector but I have understand a little information.
Tell me if you found in this topic : https://mcreator.net/forum/84919/it-possible-create-homing-rocket
And thank you for the tutto "no gravity bullet" !
this
https://imgur.com/a/cxCsaPC
i made this and it worked. targets the entity nearest to the projectile. By the way,If you want to make the bullet slower change the ^2 to a higher value(example: ^4 or ^3) might not work well with numbers that is not the multiple of two(2,4,6,8,etc) and lower the value for faster speed