Godot Version
v4.6.1.stable.mono.official [14d19694e]
Question
I want to create a missile with a trail vfx behind it. Which I’ve already done, but I’m working on a lower resolution, so the missile itself is 1 pixel wide.
The issue is, that the missile (AnimatedSprite2D) has different grid rules than objects that can work as a trail (GPUParticles2D or Line2D).
Missile has left side on y = -1, and right side on y = 0. This means center is at y = -0.5.
Trail (behavior the same for GPUParticles2D or Line2D) is positioned based only on Position, which defines it’s center, and it snaps to grid (even when grid snap at the toolbar at the top of the screen is disabled). So you either have center on y = -1 or y = 0, never at y = -0.5. Which means trail will always be a little to the right or left, no matter what you do.
Are there any ways around it? Because for now I’m out of ideas, and I’m afraid missiles will have to be scrapped, since they just don’t look right without the trail. Which I would really want to avoid.
Edit
I’ve had an epiphany just now. It doesn’t really solve my problem, so I’m still open to new ideas, but I can just use completely different approach. Turn missile into Line2D as a whole. Now there is no issue with misalignment. It only works when missile is a very simple shape, but with proper colors it looks fine.