You need to trace from mouse_pos3d to the ground using a scaled vector copy of mouse_dir(3d), then rotate the player to the trace target. Alternatively you can solve the equation of the line mouse_pos3d + mouse_dir*t so that the z-component of the result is the player height (which would be a better approach than using c_trace).


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends