Resize plane based on screen size [Solved]


Hi there,

I’m creating a WebAR project in Studio involving an invitation card (plane) and a couple UI buttons below it, with the Grab and Go function implemented.

I understand that I can use Z.screenLeft and Z.screenRight to anchor my UI to screen left, right or the middle. This works fine for the buttons, however I would like my invitation card to resize accordingly as well, as it currently remains too large/small for differing screen sizes.

I’ve scoured the forums for solutions but can’t seem to find one that works for my use case - I’m thinking I could access the screen’s height and resize the image through code based on that. Any help with code needed will also be much appreciated!


Solved using Device using? : Created a group, exposed it as attachment point, put my plane in that group and adjusted its position so that the anchor point was where I wanted it to resize from, then used this code to scale the image up and down based on the aspect ratio of the screen.

closed #2