Page 1 of 1

Adding rotation_shift to RotatedSprite and RotatedAnimation

Posted: Sun Nov 21, 2021 2:24 pm
by snouz
WHAT
I'm suggesting adding a rotated offset to RotatedSprite and RotatedAnimation, similar to LightDefinition.

WHY
When doing modded vehicles, there's no way to easily change the rotation point. The only way is to re-render or edit 256 images individually.
The shift property applies in an absolute way (it will shift each direction in the same direction) but what if you just want to adjust the position of the image relative to it's current orientation?

EXAMPLE
My specific case is in Cargo Ships. There's a boat that can either be a car if placed on water, or a locomotive+cargo-wagon if placed on a "rail". I can't use the same render for both because in the locomotive/cargo-wagon version, only one of the 2 entities has a sprite
Image

Re: Adding rotation_shift to RotatedSprite and RotatedAnimation

Posted: Sun Nov 21, 2021 8:34 pm
by Silari
+1. Ran into this issue with building remnants when trying to fix an issue with Modular Buildings: viewtopic.php?f=34&t=99015

Having a property to define how it should be offset when rotating would make it MUCH easier to do this, as it could all be done programmatically without needing any new assets.