#Changing the shape of a SubViewport

15 messages · Page 1 of 1 (latest)

limber nimbus
#

I'm making a minimap for my game and I can't seem to find a way to mask it to be circular, somewhat like a radar. I can't find any documentation online that says how to do this, does anyone know a way of doing it?

jaunty merlin
#

Add a parent sprite with a circular texture, then change "Clip Children" on it to "Clip Only"

limber nimbus
#

Do I make it a parent of the SubViewport, or SubViewportContainer?

jaunty merlin
#

A parent of the SubViewport.

limber nimbus
#

Okay

jaunty merlin
#

Or to the subviewportcontainer, if you want to. The point is that it'll clip its children to only display within its area.

#

It doesn't have to be a sprite, either; you can use any CanvasItem to clip its children, but a sprite is probably just the easiest way to get a circular shape.

limber nimbus
#

alright, thanks

#

Is there a way to display a specific camera3D inside the SubViewport without making it a child of it?

jaunty merlin
#

I don't believe so.

limber nimbus
#

hmm, well it looks like the camera3D turns 2D once I make it a child of the sprite2D

#

So when I update it to the players position, it only recognizes it as a vector2

#

No wait I get it now

#

nevermind