How do I get a single value from position

I am trying to get only the x from the position of the mouse but can’t find any way of doing it like C# or something. Is there a way not to get the double values but the x and y separate.

Hi, if I’m not wrong, the position is returned as an array: [x,y].

So if you have something like:
var pointerScreenPosition = e.screenPosition; (I got this example from the doc…)

Then:
x = pointerScreenPosition[0];
y = pointerScreenPosition[1];

2 Likes