Original Post
Hi Guys
I was wondering what would be the least expensive way of saying here is my character facing this direction and I want to return a boolean for other characters if they are within a 180 degree curve in front of me.
I can think of doing a dot product between my front vector, V1, and vector from target to me, V2, but that will involve a doing a square root operation in finding the length of V2 so I was thinking what others have to say.
Thoughts welcome.
Thanks.
I was wondering what would be the least expensive way of saying here is my character facing this direction and I want to return a boolean for other characters if they are within a 180 degree curve in front of me.
I can think of doing a dot product between my front vector, V1, and vector from target to me, V2, but that will involve a doing a square root operation in finding the length of V2 so I was thinking what others have to say.
Thoughts welcome.
Thanks.