I
I
i__egor2021-11-08 07:02:43
Unity
i__egor, 2021-11-08 07:02:43

How to get relative position of ui element in camera screen?

How to get relative position of ui element on canvas in camera screen. It is necessary that from 0f to 1f in width and also in height, (0f, 0.5f means the center of the element is left center) ?

Vector3 screenPos = cam.WorldToScreenPoint(this.transform.position);
- gives something wrong

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question