I’m trying to get a sense of how centred certain game objects are, visually. Just wondering if there’s a way to draw “rulers” in the game window—straight lines going through the game window perfectly bisecting it in half, vertically and horizontally.
I don’t imagine it’s possible, but if folks know of interesting alternatives I’d be grateful to hear them.
-n
You can create a visual grid system like the one in the editor window using GL.LINES. There’s a great explanation of how to do exactly that here.
You can actually use GL.LINES to do a whole bunch of really cool stuff when it comes to creating complex 2D graphics. Another alternative (that uses this method I believe) would be to get your hands on Vectrosity by @Eric5h5 . It’s robust enough that it can handle just about anything you throw at it, and the developer is a super-helpful regular on the forums, so you’ll always have access to support.
Vectrosity doesn’t use GL.LINES. One issue with that is it only does single pixel width.
–Eric
Those are good solutions in-game, but I’m looking for an in-editor solution—say, if I just want to centre something in my game viewport while I’m setting up the scene.
Something like Photoshops rulers, shown here.
I don’t suppose I could hack some of the above solutions (GL.Lines would be fine) to work in-editor?
Vectrosity 5 works in the editor.
–Eric