Calculating One Position For Every Resolution

Hey There,

I’m working with video player that stay on bottom selected.
Screenshot 2024-04-04 at 12.13.28
Screenshot 2024-04-04 at 12.13.28

My problem is i’m trying to get touch position on screen. And i want to replace ui for specific position on ui
But when my resolution is changes like on ipad or iphone it goes higher than correct position. How i can manage to calculate it the way that i can set like on the bottom? And it would be calculated perfectly the same position for every resolution ?

Also this is my video component and the content size never changes itself.


Is this what you want? If it is, this is my config

No, UITransform of content size never changes when resolution changed.

I’m trying to click on this;

because video player overrides the inputs so thats why i did my video player stay on bottom

This is my setup.

When I click on a specific part of the screen video, regardless of the resolution of the screen or canvas, I want to always show a sprite at that x, y point. For example, if we imagine there’s a tree in the video, I want to display the sprite at the position where the tree is, no matter the screen resolution.

When I take this position with the iPad size, the sprite appears perfectly in place. But when I try it on screens like phones, which are longer and narrower, the position appears above. It exceeds the edge of the video.

What I’m asking for is actually a function similar to RectTransformUtility.ScreenPointToLocalPointInRectangle in the Unity game engine.

I’m using enable_transparent_canvas because of the video players “stay on bottom” configuration makes screen black so i can’t see video.

I came up with a lazy idea, where you create some transparent nodes in the right places, and when you click on the screen, check if you’ve hit one of those nodes and if you’ve hit a node, you create a sprite on the position of that node

It worked @zzy you are an life saver :smile:

I’m not selecting your answer as solution because i think there is something better solution for this thanks mate