0 votes

Hi,

i want to make a texture for something like a monitor, to see what happens outside of the current screen.
I tried stuff with viewports and cameras, but i failed at getting a texture from this. I also only need a fraction of the camera/viewport size. when i get the texture from the viewport, i only get what i'm actually seeing, so this is also not working...

I don't need a complete solution, just a hint how i can do this.
Need this for 2D.

asked Jun 30 in Engine by whiteshampoo (976 points)

1 Answer

0 votes

if it is a simple texture or few pixels you wanna show you can just use an Image an ImageTexture and a TextureRect and setpixel and getpixel
eg. draw mini-map with pixels

if it is an actual view you wanna show you can use a viewport container, a viewport and a camera you can set the "Stretch Shrink" property of the viewport controller to make it a 'fraction' and adjust viewport properties

https://www.youtube.com/watch?v=QsfG8J50hP8&t=1s

answered Jun 30 by rakkarage (805 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.