How to position mesh in the corner of viewport

Hello,

I am having issues positioning my minimap at the very top right corner of the screen. My minimap is a plane with a render target texture. I have tried doing something similar to this playground, but I want my minimap to have a fixed size on all devices. I read about position the mesh using the camera’s frustum, but I’m not exactly sure how to do that.

Playground: https://playground.babylonjs.com/#V3UXRH#8

You can do it like this, using the technique shown in your first PG:

1 Like

How do I prevent the plane from resizing when the screen resizes though? That was my issue with the first playground.

EDIT: Nevermind, I just removed the scaling and everything worked nicely. Thanks!

1 Like