Sight Physics

21 02 2008

The developed AI should have around 160 degrees wide-horizontal of line of sight. Additionally, the visual distance should vary according to the brightness of the scene. Thus when the A.I turns, its visual angle turns together with it and as long as the player falls within this range he will be spotted.

Reference from: http://www.kirupa.com/developer/actionscript/trig_multiple_axis.htm

Formula 1, rotation around x axis
y = Math.cos (angleAroundXAxis)*radius; Angle = 160 degree, Radius equal distance
z = Math.sin (angleAroundXAxis)*radius; Angle = 160 degree, Radius equal distance


Actions

Information

Leave a comment

You must be logged in to post a comment.