Touch Position

Hello Guys!

I’m having trouble with my touch position. I’m using a image position in a Widget to be my Touch Reference in game, but, as you can see in this image, the images are appearing away from my clicking position. The blue circle is where I’m clicking and the grey one is the image shown.

I created a HUD class to control the widget. This is the code:

And also, I’m calling those events with my character:

As you can see, I’m using screen location to insert in the events. Wouldn’t it be enough for the widget to get the right positioning of the objects?

I’ve tried using world positioning. Didn’t work.

Thx.

Why don’t you use one of these other nodes. I have used them before they work fine. Especially if using mouse for touch the second node should be perfect for you.

Yes this looks like a good idea - remember, Touch coordinates are not the same thing as Screen coordinates (just like screen coordinates are not the same as world coordinates)

Hm, understood. I tought touch and screen were the same. I’ll try those.

Thanks guys.

I’m working mostly on weekends in this project now, my vacation is over. In a couple days I’ll come back with results. :smiley: