How about each frame get the 3d position of the cursor (its Not by trace, see code below) and vec_to_angle with between cursor point and door. And finally do something like storing mouse_force in a vector vec_rotate it with result out of vec_to_angle (or whatever, I am not so good at that part shocked ).

Code:
//Credit to Superku iirc
VECTOR PosCursor_vec;
function SetPosMouseCursor() {//stores result in a global vector called PosCursor_vec
	var f;
	vec_set(PosCursor_vec, mouse_dir3d);
	vec_scale(PosCursor_vec, 10); // depending on the camera height it can be beneficial to scale the dir vector for increased accuracy (because of the limited accuracy of var)
	if (PosCursor_vec.z == 0) PosCursor_vec.z = 0.01; 
	f = -mouse_pos3d.z / PosCursor_vec.z;
	vec_scale(PosCursor_vec, f);
	vec_add(PosCursor_vec, mouse_pos3d);
}



Code:
function .....door.... () {
...
while....

SetPosMouseCursor();
		draw_point3d(PosCursor_vec, COLOR_GREEN, 100, 5);
		
		ANGLE angle;
		vec_to_angle(angle, vec_diff(NULL, my.x, PosCursor_vec));
		var tmp = ang(angle.pan);

		if (mouse_left) { //you will probably want to change this part to something more sensical
			VECTOR _vforce;
			vec_set(_vforce, vec_rotate(vector(mouse_force.y * time_step*20, mouse_force.x * time_step*20, 0), vector(tmp, 0, 0)));
			vec_add(_pan, _vforce);
		}
		
		pXent_rotate(my, nullvector, vector(_pan.pan, 0, 0));
}



Note place your door at 0 z or similar, otherwise you will have to expand/change the SetPosMouseCursor function a bit.

Last edited by Reconnoiter; 11/02/16 11:04.