Page 1 of 1

3.4.1 PITCHFROMMOMENTUM and speed 0

PostPosted: Sun Jul 29, 2018 7:14 pm
by Enjay
This affects all versions I think. It's also probably not a bug and more a case of "well, how is GZDoom supposed to know what to do when speed is 0" but, just in case...

Setting things up like this:

  • a projectile set up to use a model
  • use the PITCHFROMMOMENTUM flag in MODELDEF
  • spawn the projectile (using SpawnProjectile in ACS)
  • set the parameters so that the projectile is moving straight down - i.e. a speed of 0 and a negative vertical speed

Result: the model points upwards even though it is travelling downwards.
Giving it a speed of 1 makes it point downwards.

Map attached. The first 3 switches (from left to right) will spawn a downwards projectile (v speed -64). The last 2 spawn a projectile upwards (v speed 64). The scripts responsible print the forward speed values. The left-most switch exhibits the kind of behaviour that I'm talking about.