proyectile that changes it direction on air

Started by a guy called l… on Wed, 04/06/2022 - 14:35

Topic category: Help with modding (Java Edition)

Last seen on 12:02, 12. Oct 2022
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
proyectile that changes it direction on air
Wed, 04/06/2022 - 14:35

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 18:20, 13. Nov 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 18:20, 13. Nov 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 12:56, 17. Nov 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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