Projectile Source moving with entity

Started by Withie The Cryptid on

Topic category: Help with Minecraft modding (Java Edition)

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!

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.

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