Is it possible to create a homing rocket ?

Started by TheDragon'sSon on Mon, 03/14/2022 - 21:14

Topic category: Help with modding (Java Edition)

Last seen on 18:24, 26. Jan 2023
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Is it possible to create a homing rocket ?
Mon, 03/14/2022 - 21:14

Hi

I've try to do a homing rocket but I haven't succeed.

Has anyone ever succeeded ?

And if you have succeed, want you help me ?

Last seen on 18:24, 26. Jan 2023
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I use this topic to write…
Sun, 05/01/2022 - 09:06

I use this topic to write all my search about homing rocket, if you had idea or information to add, welcome !

 

Last seen on 18:24, 26. Jan 2023
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Transferred from : https:/…
Sun, 05/01/2022 - 09:11

Transferred from : https://mcreator.net/comment/207431

 

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.

Last seen on 18:37, 29. Jan 2023
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I am not sure about this,…
Tue, 05/03/2022 - 07:28

I am not sure about this, but you could use a block to check every entity in a radius of the player, and if the player is looking in the direction of that player and theres no blocks in line of sight between the player and that entity, then use the UUID plugin to save the UUID to a data tag the projectile has, and on a tick update, make the rocket go towards the entity. This takes a lot of math to do with Sines and Cosines, yaw, pitch, velocity, and positions however. It should theoretically be possible, just difficult to do with mcreator.

You could accompany the weapon with a hud that changes when the entity is locked in as the entity you want to shoot at as well.

Last seen on 18:24, 26. Jan 2023
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Wow ! I'm not sure I have…
Mon, 05/09/2022 - 11:01

Wow !

I'm not sure I have the level to do that but thanks you very much !