Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | TitanicJoe |
Hello!
I have simple tree:
Node2d
+ViewportContainer
++Viewport
I set margins(right=512,bottom=600) of the VieportContainar to cover half of the screen. Size of viewport from the tree is 512x600. Size of main viewport is 1024x600. I attached script to Node2d in which I draw a rectangle:
extends Node2D
func _draw():
draw_rect(Rect2(Vector2(0,300),Vector2(1000,400)),Color(1,0.0,0.0,0.2))
I wander why this rectangle is drawn only on the area autside of aditional Viewport. How can I draw something on this aditional Viewport? How get access to the space of this Viewport to use Physics2DShapeQueryParameters. I dug through documentation, but clearly I don’t understand something important.
What are you trying to achieve btw?
Reloecc | 2020-09-17 07:11