Skip to content

Instantly share code, notes, and snippets.

@profan
Last active January 26, 2019 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save profan/e8d4eea8f62ff92d2652c2f7a0b0331d to your computer and use it in GitHub Desktop.
Save profan/e8d4eea8f62ff92d2652c2f7a0b0331d to your computer and use it in GitHub Desktop.
Collection of various Xenko utility functions (will stick them all in here as I figured out more that might be useful)
using Xenko.Core.Mathematics;
class ExtraUtils {
public static Vector3 RotateAround(Vector3 p, Vector3 origin, Quaternion rot)
{
var translated = (p - origin);
var rotated = Vector3.Transform(translated, rot);
return rotated + origin;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment