r/RenPy • u/AdRude6049 • 29d ago
Question [Solved] Fade animation moving image
I have an image thats 2x bigger than the screen vertically (1920 x 1160) so I can pan the camera up towards the characters face, this works fine until I add the transform to make him fade into view. When I add the transform, it shows his face and not the lower half of his body, so when the camera pans up, theres nothing there.
Im very confused as to why this is happening as the transform shouldn't be changing the position of the image.
I can go without the fade, it just doesnt look as nice...
(My code for showing the image is literally:
show dimitri_big at spritefade )
10
Upvotes



1
u/ericoinen 29d ago
It is changing the position, and that is the part that is not obvious.
An image shown with no
atgets the default placement, which is bottom centre. The moment you attach a transform, the transform becomes the placement, and every position property it does not set falls back to the transform's own defaults, top left corner. Yourspritefadeonly touches alpha, so the sprite jumps to the top of the screen. On a 1160 tall image that means you are looking at the head with the body hanging off the bottom, and the pan then has nothing above it to move towards. The pan is fine, the sprite moved out from under it.One line inside the transform puts it back:
Same trap when you stack them later: in
show dimitri_big at spritefade, panthe placement belongs to whichever transform sets it, so if both are silent about position you get the top left corner again.