So given the position, halfextents and rotation of a Physics.OverlapBox, how would I draw it on the screen for debugging.
If my overlap box was always rotated to Quaternion.identity it would be very easy, I could simply call Gizmos.DrawWireCube with the position and halfextents. However its not correctly orientated. From what I understand I might need to set Gizmos.matrix first, but haven't been able to find anything that works yet.
So given these values for our overlapbox
1) position
2) rotation
3) halfextents
I'm guessing I need these filled in in order to draw it onscreen
Gizmos.matrix = ?
Gizmos.DrawWireCube(?, ?)
I've tried a lot of different values and combinations, but nothing that works. Does anyone know the solution or can set me on the right track? Perhaps I'm on the wrong track entirely. Any advice appreciated.
Edit: note I can draw a gizmos.wirecube to screen and see it, that's no problem. However since I want it correctly orientated, I start to play around with the Gizmos.matrix. After doing this I'm guessing it suddenly disappears way off screen because I can't find it anywhere.