animation.rotated_offset and rendering.*.rotated_target_offset
Re: animation.rotated_offset and rendering.*.rotated_target_offset
What is the difference between this and oriented_offset?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: animation.rotated_offset and rendering.*.rotated_target_offset
Having tinkered with oriented_offset, it doesn't seem to do what I'm intending it to.
If target and orientation_target are the same, then the rendered object isn't rotated about a point as expected. If they're different, then it's rotated about the target based on the position of rotation_target. So for example, making my road train, I can make the wheels fixed to the tank and spin around to look almost like they're under the wagon.
But oriented_offset rotates based on the orientation_target. I need something that rotates based on the target. Sprites/layers also lack this option as I could potentially bake the wheels into the car entity with a rotated_offset.
If target and orientation_target are the same, then the rendered object isn't rotated about a point as expected. If they're different, then it's rotated about the target based on the position of rotation_target. So for example, making my road train, I can make the wheels fixed to the tank and spin around to look almost like they're under the wagon.
But oriented_offset rotates based on the orientation_target. I need something that rotates based on the target. Sprites/layers also lack this option as I could potentially bake the wheels into the car entity with a rotated_offset.
Re: animation.rotated_offset and rendering.*.rotated_target_offset
Here's an example of what I'm doing, v is the vehicle (tank), w is the wagon:
What I expect to happen is the wheels to animate as the wagon rotates, but do so such that they remain at the front of the wagon, no matter how that wagon rotates.
What actually happens: The wheels neither animate nor do they move relative to the orientation of the wagon.
Alternate case:
changing orientation target to the vehicle means the wheels animate as expected, but making the wheels point at the vehicle can create some strange looks when the vehicle orientation and the wagon orientation are too far apart.
What I expect to happen is the wheels to animate as the wagon rotates, but do so such that they remain at the front of the wagon, no matter how that wagon rotates.
What actually happens: The wheels neither animate nor do they move relative to the orientation of the wagon.
Alternate case:
changing orientation target to the vehicle means the wheels animate as expected, but making the wheels point at the vehicle can create some strange looks when the vehicle orientation and the wagon orientation are too far apart.
Re: animation.rotated_offset and rendering.*.rotated_target_offset
As you correctly stated, the animation rotates based on the position of the orientation_target. With that in mind, using the target as the orientation_target does not make any sense, because the position relative to the target will always be the same -> the offset will always be the same.
Do I understand correctly that you want everything (the animation and the offset) to rotate based on the target orientation, which is currently not possible at all?
As an aside, how do you intend to make the wheels have the correct perspective?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: animation.rotated_offset and rendering.*.rotated_target_offset
You are need to make it in the data stage, just one layer for the wagon, second layer for it's wheels. Or just use old graphics where it was done together.
https://mods.factorio.com/mod/LandTrains
https://mods.factorio.com/mod/LandTrains
Re: animation.rotated_offset and rendering.*.rotated_target_offset
If the horizontal position is rotated with the entity, and the vertical position is offset regardless of rotation, and the animation matches the entity it's attached to, then it should look correct. I may be able to make the wheels rotate to point at the vehicle in front so it looks neat during a turn. Maybe.
Or I could process the images to bake the wheels into the graphics.
Or I could leave them out because most people think it looks amazing with this detail missing. ¯\_(ツ)_/¯
Or I could process the images to bake the wheels into the graphics.
Or I could leave them out because most people think it looks amazing with this detail missing. ¯\_(ツ)_/¯
Re: animation.rotated_offset and rendering.*.rotated_target_offset
I guess is what I want is animation_match=target so something animates as its target does. I think.