okay, i confused angles with directional vectors in case of vec_inverse... now it works however. Another restriction is that the origin must be in the middle of the model, else it will be offset. But with a little bit easy math you can also fix that up if needed. oh yeah..the code^^ and the best: it works!

Code:
#include <acknex.h>
#include <default.c>

ENTITY* centerEnt;

void on_c_event(){
	float aspect = screen_size.y/screen_size.x;
	
	float modelSizeY = (centerEnt.max_y-centerEnt.min_y)*0.5;
	float modelSizeZ = (centerEnt.max_z-centerEnt.min_z)*0.5;
	float distY = modelSizeY/tanv(camera.arc*0.5);
	float distZ = modelSizeZ/tanv(camera.arc*aspect*0.5);
	float camDist = maxv(distY, distZ) + centerEnt.max_x;
	
	vec_set(centerEnt.x, vector(camDist, 0, 0));
	vec_rotate(centerEnt.x, camera.pan);
	vec_add(centerEnt.x, camera.x);
	vec_for_angle(centerEnt.pan, camera.pan);
	vec_inverse(centerEnt.pan);
	vec_to_angle(centerEnt.pan, centerEnt.pan);
}

void main(){
	level_load(NULL);
	centerEnt = ent_create(CUBE_MDL, nullvector, NULL);
	wait(1);
	c_setminmax(centerEnt);
}



PS: I don't know why there is a little space on the sides. afaics it's not the precision of float, but I can't find a quick explaination...whatever should be enough for a screenshot wink