Quantcast
Channel: Bugs Latest Topics
Viewing all articles
Browse latest Browse all 760

Babylon GUI and hardwareScalingLevel

$
0
0

Hi everyone,

I have some issues with BABYLON.GUI on devices with more than one pixel per pixel.

(third topic this month concerning pixel ratio... ^^' )

https://www.babylonjs-playground.com/#XCPP9Y#216

I think the pointDown event has a value in "layout pixel", but the GUI lib uses it as "texture pixel", so it's out (if you put your cursor down right the window, you will see it fires the pointer event)

My guess :

1) Either the layout should be made in "layout pixel" : When a box is said to have a height of 100px, on a device with 0.5 ratio, it's 200px on the AdvancedRenderingTexture.

2) Either we scale the pointerInput Vector2 argument.

3) I missed an already existing option to solve this.

I'd say option 1 makes more sense, also 3 is more likely to happen :P

But it's up to you. Should I submit a PR ?

Thanks and have a nice day !


Viewing all articles
Browse latest Browse all 760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>