Posted By: EpsiloN
Help with ISOMETRIC and mouse_dir3d - 04/07/15 07:18
I tried pointing my player towards the mouse in ISOMETRIC camera mode and top-down view with mouse_dir3d, but it doesn't work at all. Height of camera is set at max ~650 quants.
After that, I tried the old method:
But it doesn't work as it should either. It sets only hit.y I think, so the player points mainly to the right and sometimes rotates a little (nowhere near the mouse)...
I'm using this for the mouse:
Anyone got any solutions?
EDIT: No error in code, because it works without ISOMETRIC flag...
After that, I tried the old method:
Code:
testvec1[0] = mouse_pos.x; testvec1[1] = mouse_pos.y; testvec1[2] = 10; testvec2[0] = mouse_pos.x; testvec2[1] = mouse_pos.y; testvec2[2] = 1000; vec_for_screen(testvec1[0], camera); vec_for_screen(testvec2[0], camera); c_trace(testvec1[0], testvec2[0], IGNORE_ME); mouse_dir3d vec_set(debug_var[3], hit.x); vec_to_angle(my.pan,hit.x);
But it doesn't work as it should either. It sets only hit.y I think, so the player points mainly to the right and sometimes rotates a little (nowhere near the mouse)...
I'm using this for the mouse:
Code:
while (mouse_mode > 0) // move it over the screen { vec_set(mouse_pos,mouse_cursor); wait(1); }
Anyone got any solutions?
EDIT: No error in code, because it works without ISOMETRIC flag...