Last active
January 26, 2019 17:59
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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