- Joined
- Jul 10, 2010
- Messages
- 124
So I remember this problem from WCIII where a function that returned angles would sometimes return a range of 0,360 and other times would return -180,180.
I solved it in WCIII using mod360, but I can't figure it out here.
So I have 2 tanks facing each other. They are placed on the map facing east and west. The action definition sets up the range of the turrets to be from their initial facing +/- 30 degrees, so the tank facing east will rotate from 270, thru 0, to 30. The tank facing west will rotate from 150 to 210.
Problem is the tank facing west, upon hitting 180, will think it is LESS THAN 150:
note: camera yaw controls the tank facing
I solved it in WCIII using mod360, but I can't figure it out here.
So I have 2 tanks facing each other. They are placed on the map facing east and west. The action definition sets up the range of the turrets to be from their initial facing +/- 30 degrees, so the tank facing east will rotate from 270, thru 0, to 30. The tank facing west will rotate from 150 to 210.
Problem is the tank facing west, upon hitting 180, will think it is LESS THAN 150:
note: camera yaw controls the tank facing