I’ve created a plane on the canvas (empty RectTransform) with these values:
Then i’ve created an Image as a child of that plane. RectTransform values:
Now i want to animate movement of that image using Timeline. So i create a new empty GameObject, add PlayableDirector to it, assign (newly created) Timeline, then I added animation track to that Timeline and assigned my Image to that track (I added animator to Image object when it asked me to).
So far so good. Then I animated change of the scale of my Image and it went perfectly (as expected).
The issue: when i try to animate change in anchored position (PosX and PosY) I set keyframe at the beginning of the animation so that PosX and PosY are equal to zero. Move few frames away and when i try to change value of PosX or PosY it just snaps back to the zero. And if i go to the Animation window and change PosX value there, I end up with the animation where every other frame my image is on zero coordinates and next frame it is where it should be. So it just flickers from supposed position to the zero coordinates and back.
What I’ve tried:
- Adding canvas component to the parent panel.
- Making parent panel fixed size.
- Changing pivot for both parent panel and Image.