proyectile that changes it direction on air

Started by a guy called l… on

Topic category: Help with modding (Java Edition)

Last seen on 23:35, 30. Oct 2023
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
proyectile that changes it direction on air

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

Last seen on 15:34, 1. Mar 2024
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In reality, it's an homing…
Sat, 04/30/2022 - 21:02

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

Last seen on 15:34, 1. Mar 2024
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And thank you for the tutto …
Sat, 04/30/2022 - 21:03

And thank you for the tutto "no gravity bullet" !

Last seen on 18:09, 16. Mar 2024
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
this https://imgur.com/a…
Tue, 10/04/2022 - 13:29

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