Rising from a discussion in this thread:
http://forum.zdoom.org/viewtopic.php?f=3&t=33044
It would be useful if the trails spawned by fastprojectiles could inherit the pitch of the projectile that spawned them.
FastProjectile trails to inherit pitch from the projectile
Moderator: GZDoom Developers
Re: FastProjectile trails to inherit pitch from the projecti
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.
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.
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))
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.
Re: FastProjectile trails to inherit pitch from the projecti
Yeah, but you can't replicate FastProjectile trails with A_SpawnItemEx.MG_Man wrote:Isn't there a flag for that in A_SpawnItemEx? (SXF_TRANSFERPITCH)
Re: FastProjectile trails to inherit pitch from the projecti
My bad, I thought this was referring to the method The Ultimate DooMer used in the first post of the other thread.
I think with modification that can still be used to get what he wants. Let me play with it for a bit.
Otherwise, this is just sidestepping the original request which I think would be useful. Just remember that the original projectile still probably won't have the pitch transferred from the player unless A_FireCustomMissile was modified as well, so you'll still need to use one of my earlier methods.
I think with modification that can still be used to get what he wants. Let me play with it for a bit.
Otherwise, this is just sidestepping the original request which I think would be useful. Just remember that the original projectile still probably won't have the pitch transferred from the player unless A_FireCustomMissile was modified as well, so you'll still need to use one of my earlier methods.