What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

WoWMathHelper.IsFacing degree: ignore Z coord? (i.e. 2D version)

jim87

New Member
Joined
Aug 26, 2011
Messages
445
Reaction score
7
Hello! I'm encourring in difficulties using the topic method: I'd like to calculate the facing degree in 2D only, while it calculates a 3D cone and returns relatively to it. My first idea was to modify my target's copy Z coord equal to the player's one, but the property is read-only. Without having to write my own vector method, is there a way to do it with the actual ones?

Thanks
 
Found the solution: instead of trying to "normalize" an entire WoWObject, I've created a new WoWPoint as myTarget.Location, then I've changed the Z coord :)

Testing, should work now...
 
WoWMathHelper.IsFacing already ignores Z.
 
As MaiN said, IsFacing already ignores the Z coordinate. (WoW doesn't take that into account for any sort of facing/behind/in front type calculations. Only distance.)
 
The last changelog says: "WoWMathHelper.IsFacing/IsBehind now uses a proper method to determine the values. This should clear up *any* issues with IsFacing/IsBehind (and their "Safely" versions)", and in the intellisense popup it is written it calculates a cone, not a triangle. And effectively it works as a cone, in 3 dimensions. At least this is how AutoAngler2 fixed the problem facing the pools (the player was 2D-facing the pool, but it was out of the cone due to Z difference, and the bot continued trying to facing the pool instead of casting Fishing).
 
Last edited:
Back
Top