by MG_Man » Sun Jun 24, 2012 12:55 pm
Isn't there a flag for that in
A_SpawnItemEx? (SXF_TRANSFERPITCH)
Otherwise, I think the problem is that projectiles in general don't normally have a pitch set -- just their velocities set to move in a certain vertical direction. As stated in the A_SpawnItemEx page, 'pitch' acts as just a variable in projectiles that holds no function (other than for model purposes).
You could use a trig function to set the original projectile's pitch according to the projectile's velocity, then it can be transferred to the trail projectiles through the A_SpawnItemEx flag. Remember, this will have no effect other than rotating a model accordingly if it's set to do that kind of thing.
Code: Select all
AAAA 0 A_SetPitch (sin(velz)/cos(velx))
should do the trick.
Alternatively, if you fired the original projectile using A_SpawnItemEx (instead of A_FireCustomMissile) using the paramaters in the SXF_TRANSFERPITCH example, you could have the pitch transferred directly from the player instead of having it be determined, but I don't know what side effects that would have.
Isn't there a flag for that in [url=http://zdoom.org/wiki/A_SpawnItemEx]A_SpawnItemEx[/url]? (SXF_TRANSFERPITCH)
Otherwise, I think the problem is that projectiles in general don't normally have a pitch set -- just their velocities set to move in a certain vertical direction. As stated in the A_SpawnItemEx page, 'pitch' acts as just a variable in projectiles that holds no function (other than for model purposes).
You could use a trig function to set the original projectile's pitch according to the projectile's velocity, then it can be transferred to the trail projectiles through the A_SpawnItemEx flag. Remember, this will have no effect other than rotating a model accordingly if it's set to do that kind of thing.
[code]AAAA 0 A_SetPitch (sin(velz)/cos(velx))[/code] should do the trick.
Alternatively, if you fired the original projectile using A_SpawnItemEx (instead of A_FireCustomMissile) using the paramaters in the SXF_TRANSFERPITCH example, you could have the pitch transferred directly from the player instead of having it be determined, but I don't know what side effects that would have.