// Find out what the URL to the server is
String url = sessionManager.getServerURL();
// Compute the current look angle, as degrees from the +x axis, ignoring
// any look in the y-axis.
Quaternion viewRotation = viewTransform.getRotation(null);
Vector3f v1 = new Vector3f(0, 0, 1);
Vector3f normal = new Vector3f(0, 1, 0);
Vector3f v2 = viewRotation.mult(v1);
v2.normalizeLocal();
// Compute the signed angle between v1 and v2. We do this with the
// following formula: angle = atan2(normal dot (v1 cross v2), v1 dot v2)
float dotProduct = v1.dot(v2);