I have the same issue now too. When I fire it from one angle, it works perfectly if I aim up or down or horizontally. However, if I move left and right of that or 180 degrees, the trails end up facing the wrong way.
So when fired straight north (or whichever direction it is), the trail is perpendicular to the path of the projectile. That angle between travel path and trail decreases as you move closer to the west and increases as you move closer to the east. When you're facing directly west, it's perfect. The projectile moves west and the trail is right behind it. When you're facing east, however, it's the opposite. It's as if the trail sprites have a fixed position in space that doesn't take the facing angle into account at all.
That makes me wonder what exactly momx, momy, and momz really are. Are they really just the x, y, and z components of the speed vector? Do they take into account the actor's facing angle?
Here's what I have right now:
Code: Select all
FX03 B 0 bright A_SpawnItemEx("KineticTrail", -(momx/12), -(momy/12), -1*(momz - 10*(momz/12)), 0, 0, 0, 0, 1, 0)
FX03 B 0 bright A_SpawnItemEx("KineticTrail", -2*(momx/12), -2*(momy/12), -1*(momz - 9*(momz/12)), 0, 0, 0, 0, 1, 0)
FX03 B 0 bright A_SpawnItemEx("KineticTrail", -3*(momx/12), -3*(momy/12), -1*(momz - 8*(momz/12)), 0, 0, 0, 0, 1, 0)
FX03 B 0 bright A_SpawnItemEx("KineticTrail", -4*(momx/12), -4*(momy/12), -1*(momz - 7*(momz/12)), 0, 0, 0, 0, 1, 0)
FX03 B 0 bright A_SpawnItemEx("KineticTrail", -5*(momx/12), -5*(momy/12), -1*(momz - 6*(momz/12)), 0, 0, 0, 0, 1, 0)
FX03 B 0 bright A_SpawnItemEx("KineticTrail", -6*(momx/12), -6*(momy/12), -1*(momz - 5*(momz/12)), 0, 0, 0, 0, 1, 0)
FX03 B 0 bright A_SpawnItemEx("KineticTrail", -7*(momx/12), -7*(momy/12), -1*(momz - 4*(momz/12)), 0, 0, 0, 0, 1, 0)
FX03 B 0 bright A_SpawnItemEx("KineticTrail", -8*(momx/12), -8*(momy/12), -1*(momz - 3*(momz/12)), 0, 0, 0, 0, 1, 0)
FX03 B 0 bright A_SpawnItemEx("KineticTrail", -9*(momx/12), -9*(momy/12), -1*(momz - 2*(momz/12)), 0, 0, 0, 0, 1, 0)
FX03 B 1 bright A_SpawnItemEx("KineticTrail", -10*(momx/12), -10*(momy/12), -1*(momz - 1*(momz/12)), 0, 0, 0, 0, 1, 0)