How to draw a rectangle with a border pixel over a camera/viewport?

by Boneco Sinforoso   Last Updated October 19, 2019 23:13 PM - source

With this code I intended to visually delimit the complete view of the circuit and the two controlled cars:

draw_rectangle(0,0,1279,719,true);
draw_rectangle(0,720,639,1079,true);
draw_rectangle(640,720,1279,1079,true);

It turns out that only the complete view of the circuit that is drawn directly in the room is correctly delimited (observe the black line of a thick pixel):

enter image description here

Where there should be the rectangle strokes (red line, not necessarily at this thickness):

enter image description here

This happens because of this camera/viewport:

enter image description here

I believe the rectangle is being drawn under the camera/viewport.

What do I need to do to make this rectangle draw over the camera/viewport?



Related Questions


Character sprite breaks after adding viewport

Updated February 25, 2019 17:13 PM


How to draw the path with a thicker stroke?

Updated October 01, 2019 00:13 AM


Directional, Smooth scaling

Updated July 15, 2016 08:05 AM