Hi I am using this code below for 2d pan and zoom:
http://www.blitzbasic.com/codearcs/codearcs.php?code=2269
It lets you draw polys, which is nice, and I want to draw a triangle to show the sight cone for a gun. I know the range of the weapon and its angle of movement,e.g. 65 degrees each way. =130 degrees and range of 6 squares
I can already calculate if the weapon is in range and within the right angle but I dont know how to get the co-ords of a point that is 65 degrees away and a range of 60 units for instance.
and of course the sight cone would have to correspond to the angle of the gun:):)
http://www.blitzbasic.com/codearcs/codearcs.php?code=2269
It lets you draw polys, which is nice, and I want to draw a triangle to show the sight cone for a gun. I know the range of the weapon and its angle of movement,e.g. 65 degrees each way. =130 degrees and range of 6 squares
I can already calculate if the weapon is in range and within the right angle but I dont know how to get the co-ords of a point that is 65 degrees away and a range of 60 units for instance.
and of course the sight cone would have to correspond to the angle of the gun:):)