Skip to content

@Agrosis /gist:4083992
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
pitch/yaw to directional vector
// pitch and yaw are in degrees
Vector3D getDirectionVector() {
return new Vector3D(-Math.cos(pitch * Math.PI / 180.0) * Math.sin(yaw * Math.PI / 180.0), Math.sin(pitch * Math.PI / 180.0), -Math.cos(pitch * Math.PI / 180.0) * Math.cos(yaw * Math.PI / 180.0));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.