RalphYDY Yes,I want to map to 0-1 normalized ‘RectTransform’ bounds.
Actually, The Spine I imported is not a SkeletonGraphic but SpineAnimation object.To be exact,I want to map the mouse-click screen coordinates to the skeleton MeshReder bounds coordinates.
Now unfortunately these two lines confused me, as they seem somewhat contradictory. If you are using RectTransform
, then you're using it under a Canvas
which would mean that you should be using SkeletonGraphic
(UI). But your screenshot shows a normal Transform
, not a RectTransform
. I assume that you are using RectTransform
incorrectly here and didn't mean to, right?
Because I want to realize the function of drawing on the separated animation in parts Render.
How do you intend to do that?
The anchor point of each renderer child object is based on the orgin of the animation. But their local position is zero.
Yes, what do you expect it to be? It just splits one mesh draw call into multiple.
When I map the coordinates, It's always missing this offset.
What do you mean by "it's missing this offset"? There is no offset, and there should be none. 🙂
RalphYDY If i can modify the anchor point to zero in their separated parts Render as show below.
![](https://zh.esotericsoftware.com/forum/assets/files/2023-06-14/1686711626-38589-center.png)
or calculate this offsets,My mapping coordinates turned out to be correct.
Please note that we don't know your project as you do. We have no idea what is shown here and what you would expect it to look like.
I'm afraid we need a detailed step-wise description of what you want to do and how you are doing it (show code), what you expect to see and what you see instead. The information you posted just mentions that you are mapping coordinates in an incorrect way related to certain offsets, but without knowing how you are attempting to do that, we can't really help I'm afraid.