/apps/demos/scenery: lock movement direction to a plane
This commit is contained in:
		| @@ -83,6 +83,9 @@ static void process_ground_mode(State *state) { | ||||
|     DrawCameraFromPrincipalAxesResult dir_and_up = | ||||
|         draw_camera_from_principal_axes(scn->pos, (float)M_PI_2 * 0.8f, scn->roll, scn->pitch, scn->yaw); | ||||
|  | ||||
|     dir_and_up.direction.y = 0; | ||||
|     dir_and_up.direction = vec3_norm(dir_and_up.direction); | ||||
|  | ||||
|     const Vec3 right = m_vec_norm(m_vec_cross(dir_and_up.direction, dir_and_up.up)); | ||||
|     const float speed = 0.18f; /* TODO: put this in a better place */ | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user