by FDARI » Fri Jul 29, 2011 5:12 pm
A_SetPitch with PITCH_CALCULATE would work as follows:
A_SetPitch(0, PITCH_CALCULATE): Calculate the pitch based on current velocity, and save that as the pitch property.
A_SetPitch(10, PITCH_CALCULATE): Calculate the pitch based on current velocity, and save that + 10 degrees as the pitch property.
Sometimes this might not be enough. This works when you need to recalculate your velocuty-based pitch info based on any of several events that can happen to an actor during its lifetime.
The velocity might not always have the pitch you want to know about, of course. A_SetPitch might not actually cover all needs, especially not after A_FireCustomMissile, with autoaims and the lots. I'll think about flags for a possible added parameter.
A_SetPitch with PITCH_CALCULATE would work as follows:
A_SetPitch(0, PITCH_CALCULATE): Calculate the pitch based on current velocity, and save that as the pitch property.
A_SetPitch(10, PITCH_CALCULATE): Calculate the pitch based on current velocity, and save that + 10 degrees as the pitch property.
Sometimes this might not be enough. This works when you need to recalculate your velocuty-based pitch info based on any of several events that can happen to an actor during its lifetime.
The velocity might not always have the pitch you want to know about, of course. A_SetPitch might not actually cover all needs, especially not after A_FireCustomMissile, with autoaims and the lots. I'll think about flags for a possible added parameter.