Originally Posted By: Superku
You have already asked this question in another forum and you even got some replies:
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=424401#Post424401

Have you tried to code one of the suggested approaches? If yes, where do/ did you encounter problems? Post your code.

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:

Code:
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?

Last edited by Ruben; 06/16/13 01:21.