you want to do collision detection with a flying cam, rigth?

I made this code for me:
Code:
#include <acknex.h>

function create_walk_througth(VIEW* view)
{
	wait(1);
	my = ent_create(CUBE_MDL, camera.x, NULL);
	vec_set(my.pan, camera.pan);
	view.clip_near = 0;
	while(1)
	{
		my.pan -= mouse_force.x / 4 - (key_cul - key_cur) * time_step * 5;
		my.tilt += mouse_force.y / 4 + (key_cuu - key_cud) * time_step * 5;
		c_move(my, vector((key_w - key_s) * time_step * 5, (key_a - key_d) * time_step * 5, 0), nullvector, IGNORE_PASSABLE | GLIDE);
		vec_set(view.x, my.x);
		vec_set(view.pan, my.pan);
		wait(1);
	}
}

void main()
{
	level_load("level.wmb");
	wait(5);
	create_walk_througth(camera);
}



just copy the code and replace the levelname...

if you want to do collision detection with a player model use c_move (view the manual!) insted of vec_set


Sry for my bad English!! I'm German!!
A7 Extra Edition
Intel Core i7-960 (4x3.2GHz), 8GB DDR3, 9800GT 1GB
My homepage: www.ultitech.de