TheOverWhelm
Member
- Reaction score
- 16
Say, when you do Angle Between Points, and it's from Origin and a Unit..
Say the Unit is at 179 Degrees. The function will read it as 179
If the Unit is at 181 Degrees, Angle Between Points will read it as -179. How do you effectively check to make sure the unit is between 2 angles that's dependent on the casting angle?
Edit: Keep in mind I'm making an ability that is cast at a point and checks the possibly-effected units angle with the caster.
Edit: By making both the angle between Origin and Unit positive and the angle between Origin and Cast Point positive, then do Minus one to the other and check the number is between -X and X, it works.
Feels inefficient but I guess it works for now
Say the Unit is at 179 Degrees. The function will read it as 179
If the Unit is at 181 Degrees, Angle Between Points will read it as -179. How do you effectively check to make sure the unit is between 2 angles that's dependent on the casting angle?
Edit: Keep in mind I'm making an ability that is cast at a point and checks the possibly-effected units angle with the caster.
Edit: By making both the angle between Origin and Unit positive and the angle between Origin and Cast Point positive, then do Minus one to the other and check the number is between -X and X, it works.
Feels inefficient but I guess it works for now