Tag Info

Hot answers tagged


Create an empty gameobject, make it child of your gameobject. Move it to one of the corners you want to rotate about, Use RotateAround to rotate your gameobject. You could also do the same through code by calculating the dimensions of your gameobject. Edit: You could use these scripts to make your life easier: PivotManager, SetPivot.


Not sure if this is the most performant, but it can be visualized easily: //assuming you're starting with a relatively orthonormal matrix 1.) Take one of your matrix's 3 basis vectors and dot it against the 6 world orthogonal vectors and set it to the one whose result is closest to 1.0. 2.) Do the same for one of the 2 remaining basis vectors. 3.) Cross ...

Only top voted, non community-wiki answers of a minimum length are eligible