Projectile Source moving with entity

Started by Withie The Cryptid on

Topic category: Help with modding (Java Edition)

Last seen on 04:38, 5. Oct 2024
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Projectile Source moving with entity

So, I'm making a sort of tank mob that will shoot 3 arrows from all 4 sides (without it aimed specifically at the player). I want it so that as it rotates, the source of the projectiles moves with it. That way, you won't be able to just stand southeast of it to dodge every arrow it shoots. I'm using procedures to try and make it. However, I've discovered that no matter what I try, the source of the projectiles stays in the exact same spot while the mob is rotating. If what I'm saying is confusing, I made a little diagram to show what I want and what's happening.

 

https://imgur.com/a/25Q782L

 

If anyone knows what to do, I'd love to hear it!

Last seen on 07:30, 13. Aug 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i made a tuto, it was to…
Mon, 01/22/2024 - 20:28

i made a tuto, it was to difficult to adjuste it to where the entity is looking at so i improvise : 

https://youtu.be/ZKIMLSmoDAI?si=YKngc7FGkakn9PCS

Hope it will help

PS : i didnt make it so he shoot three arrow sorry

 

Last seen on 04:38, 5. Oct 2024
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@Evistix466 Thanks for…
Tue, 01/23/2024 - 00:07

@Evistix466 Thanks for trying, but that didn't really help with my issue. The issue isn't that the arrows aren't randomized, the issue is that when the mob rotates, the projectile sources don't rotate with it. The mob has specific parts of it's body that are supposed to look like arrows are coming out of them when they shoot (sort of like dispensers), but if the projectile sources don't rotate with the mob, then if the mob rotates as it's moving, it will look a lot worse and more sloppy.

Last seen on 07:30, 13. Aug 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yep sorry, i have a hard…
Tue, 01/23/2024 - 09:06

yep sorry, i have a hard time too trying to understand how the entity visualisation work, you might need to work with trygonometry, radiant, sin and cos to make it happen

This might help you : https://mcreator.net/forum/93481/it-possible-detect-where-you-being-attacked

Let me know if you suceed