How do I detect if the player is facing the back of an entity?

Started by 8BitBunnie on

Topic category: Help with MCreator software

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I detect if the player is facing the back of an entity?

I'm trying to make a weapon that deals bonus damage if the player is facing the back of an entity, is there anyway I would be able to detect if the entity is facing away from the player or if the player is facing the back of an entity?

Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This it might be too fetched…
Mon, 07/31/2023 - 04:06

This it might be too fetched, but you can try casting a get entity in cube size, get if you are in the same X or Z coords as it, and check if both are looking in the same direction. That's my idea.

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
YT_Jack56 Although that'd…
Tue, 08/01/2023 - 00:58

YT_Jack56 Although that'd work, then it'd only if the entity is facing exactly (to the decimal) the same direction of the player which is a bit too strict for me