In order to trace, I would assume c_trace is the only function to use, unless I am mistaken. In order to use c_trace, don't you need two vertices to create the c_trace beam?
Okay, I can find a vertex on my player character by opening up MED. But what about the camera that is following my character? How can I find a vertex on the camera following my character in order to complete the c_trace beam?
Here is my code for the camera following my character:
function camera_follow(ENTITY* ent)
{
while(1)
{
vec_set(camera.x,vector(-200,-35,45)); //camera position relative to the player
vec_rotate(camera.x,ent.pan); // rotate the camera position with the player
vec_add(camera.x,ent.x); // add player position
vec_set(camera.pan,vector(ent.pan,-5,0)); // look in player direction, slighty down
wait(1);
}
}
How would I find the vertex for the camera from this code, or do I really need the vertex of the camera to do the c_trace?