I am setting up my player so that he sends out a sonar c_trace. I was under the impression that c_trace sends out a "laser" and not a "cone", but the results I am getting indicate it's tracing a vertical plane/cone. Side-to-side tracing works as expected - my sonar activated entities are triggered when the player's center of view enters the left or right of the entities. However, top-to-bottom seems to be disregarded. As long as the center of my player's view is between the left/right sides of an entity, even if the center of the view is above or below the entity, the sonar is triggered. I want it so it only triggers if the center of view is between left/right AND top/bottom.
Following is my player code for tracing:
Code:
VECTOR vTrace;
...
vec_set(vTrace.x,vector(1000,0,0));
vec_rotate(vTrace,vector(my.pan,0,0));
vec_add(vTrace, my.x);
c_trace(my.x, vTrace.x, IGNORE_ME | IGNORE_MAPS | ACTIVATE_SONAR );
What am I missing?
Thanks.