Forum Archive

Creating touch location variables

HT

Hello!

I would like to initialize a variable that functions just like the one you get from touch.location (e.g. you can access the x coordinate with touch.location.x).

If i initialize the variable like this

x = [150, 200]

it will not work with functions that only work with touch.locations.
How can I create variables like this programmatically?

omz

You could try something like ui.Point(150, 200).

HT

Works perfectly, thanks!