FastProjectile trails to inherit pitch from the projectile

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: FastProjectile trails to inherit pitch from the projectile

Re: FastProjectile trails to inherit pitch from the projecti

by MG_Man » Sun Jun 24, 2012 2:41 pm

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.

Re: FastProjectile trails to inherit pitch from the projecti

by Gez » Sun Jun 24, 2012 2:20 pm

MG_Man wrote:Isn't there a flag for that in A_SpawnItemEx? (SXF_TRANSFERPITCH)
Yeah, but you can't replicate FastProjectile trails with A_SpawnItemEx.

Re: FastProjectile trails to inherit pitch from the projecti

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.

FastProjectile trails to inherit pitch from the projectile

by Enjay » Sat Jun 09, 2012 5:03 pm

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.

Top