The pyramid volume is used to define a search area for the functions that us a search volume. It can be used to mimic the point of view of a camera.
pos : position3 table formatted with p being the coordinates it is located at and x, y, z being velocity unit vectors.
{ p = Vec3,
x = Vec3,
y = Vec3,
z = Vec3 }
length : distance in meters
halfAngleHor: radians (probably) angle limits assumed to be greater than 0 but less than pi/2
halfAngleVer: radians (probably) angle limits assumed to be greater than 0 but less than pi/2
For example these values would result in a 4:1 aspect ratio where the width is 4x as wide as the height.
halfAngleHor = math.rad(40)
halfAngleVer = math.rad(10)
This image may help illustrate what it could look like.
|