Addon to tell if you're behind a mob?

Is there an addon that tells you if you’re standing behind the mob you’re fighting? Maybe makes the hotkey a different color or something?

I know it seems like a stupid thing, but with the new mobile way of fighting, and if you’re fighting a mob in a crowd of either spell effects or player adds (such as a Monk or Mage’s duplicates), it can be easy to get lost. Especially if the boss isn’t terribly large to begin with.

The advantages of such a thing would be obvious for any melee, but especally for Feral Druids and Rogues that get extra benefits for attacking from behind.

Anyway, it it out there? Or can such a thing be done with existing addons?

usable, noMana = IsUsableSpell("<spellname>" or <spellID>) will test for whether or not a given ability is usable.

If usable is false and noMana is false then something else must be lacking. You’re not given the information to know precisely what condition was not met but contextually you could probably test range separately and eliminate other factors well enough to determine if the only problem is that you’re not behind your target.

I don’t Rogue, so I can’t really write anything (and test it) accurately, but it leads me to believe that a WeakAura upload or an addon for this would be possible.

This would only work if you have an ability that can only be cast from behind. As far as just testing for whether you are behind another mob otherwise, I can’t see a way to do it with the code base being what it is. I looked through both the Wikis and FrameXML and there’s no unprotected function that I can find that looks like it would do the job.

This question came out of a discussion about how bosses can parry you if you’re in front of them, but not behind, but there are other mobs who have effects that go after everyone in front, so being behind would be a good thing.

Parry and block only work if attacks aren’t coming from behind - nothing at all to do with bosses.

I understand the need for it. I just think BlizZard has it gated behind protected status on purpose. Some sort of anti-botting or fair-play mechanism.

Huh?

If UnitA and UnitB are both attacking the same mob, with UnitA attacking from the front while UnitB attacks from behind, UnitA can still be parried or blocked.

From https://wowpedia.fandom.com/wiki/Parry.

Parry is the name of a passive ability which gives targets of melee attacks a chance to parry each incoming frontal attack.

From https://wowpedia.fandom.com/wiki/Block.

All creatures will now report a Block on attacks from the front, reducing damage caused instead of converting the attack into a “Miss.” Creatures will no longer be able to Block attacks from behind.

Not sure what the discussion has to do with attacks that happen at the same time that are NOT from behind.

I was just confused by your comment on what appeared to be an already understood fact of the conversation so I addressed the only use case I could think of that might have triggered it.

Oh. <facepalm> I was addressing his statement that it applied to BOSSES. It applies to any mob or player.