A_FaceTarget with Pitch
Moderator: GZDoom Developers
A_FaceTarget with Pitch
A_FaceTarget(float max_turn = 0, float max_pitch = 270)
(And the same for Tracer and Master.)
After some pressuring from certain community members who shall go unnamed*, I have rewritten the code for pitching to target. It is the same basic idea; if max_pitch is unprovided (or greater than 180) then the function does not affect pitch, otherwise it works like max_turn.
Now, I think that ideally the function would default to affecting pitch, but I do not feel confident enough to say that it would not break compatibility. (Although, the risk would certainly be minimal enough, given the current futility of using a monster's pitch.)
*NeuralStunner
(And the same for Tracer and Master.)
After some pressuring from certain community members who shall go unnamed*, I have rewritten the code for pitching to target. It is the same basic idea; if max_pitch is unprovided (or greater than 180) then the function does not affect pitch, otherwise it works like max_turn.
Now, I think that ideally the function would default to affecting pitch, but I do not feel confident enough to say that it would not break compatibility. (Although, the risk would certainly be minimal enough, given the current futility of using a monster's pitch.)
*NeuralStunner
- Attachments
-
A_FaceTarget.7z
- patch for r3445
- (1.38 KiB) Downloaded 64 times
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: A_FaceTarget with Pitch
Hooray!
I have a lot of mod features depending on this. *Crosses toes*
I have a lot of mod features depending on this. *Crosses toes*
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: A_FaceTarget with Pitch
Thank you. 

Re: A_FaceTarget with Pitch
And how can non-player pitch be noticeable in Doom?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: A_FaceTarget with Pitch
It's only useful for some custom stuff but don't ask me what.
Re: A_FaceTarget with Pitch
The idea is that if the pitch is actually set, then you can use it in [wiki]DECORATE expressions[/wiki] for various types of effects. It's especially useful so as to to have a monster transfer its aim pitch to the missiles it launches, so that the missile can then spawn subprojectiles that will have an appropriate trajectory instead of suddenly being horizontal.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: A_FaceTarget with Pitch
NeuralStunner wrote:For anyone that wants to know what you can do with Pitch through A_FaceTarget: This micro-mod will demonstrate just a few. Summon the various example actors to see them in acton:
- JumpingDemon: Uses pitch to leap at you. Very derpy but the point is made.
- GAD: Like the ones in Rise of the Triad, it "tilts" in your POV as you move up and down in relation to it. (Only works in singleplayer and the angles aren't quite right. But again, it gets the idea across.)
- HomingSoul: This critter replaces the stock charging attack with a homing one. (Won't get stuck against pickups, either!) Although it's hilarious if you get a stationary object between you and it... Move out of its field of view and it'll stop charging, though.
- Cacoturret: At first glance, a really aggressive Cacodemon that doesn't move. But move directly above or below it, and it'll watch you helplessly. (Simulated vertical field of attack, extremely simple and quite useful!)
Re: A_FaceTarget with Pitch
Okay... Sounds like it can do a lot of useful stuff...
- Xtyfe
- Posts: 1490
- Joined: Fri Dec 14, 2007 6:29 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
Re: A_FaceTarget with Pitch
The homing soul stuff caught my eye, could something like this be used to recreate the original lost soul attack?NeuralStunner wrote:NeuralStunner wrote:For anyone that wants to know what you can do with Pitch through A_FaceTarget: This micro-mod will demonstrate just a few. Summon the various example actors to see them in acton:
- JumpingDemon: Uses pitch to leap at you. Very derpy but the point is made.
- GAD: Like the ones in Rise of the Triad, it "tilts" in your POV as you move up and down in relation to it. (Only works in singleplayer and the angles aren't quite right. But again, it gets the idea across.)
- HomingSoul: This critter replaces the stock charging attack with a homing one. (Won't get stuck against pickups, either!) Although it's hilarious if you get a stationary object between you and it... Move out of its field of view and it'll stop charging, though.
- Cacoturret: At first glance, a really aggressive Cacodemon that doesn't move. But move directly above or below it, and it'll watch you helplessly. (Simulated vertical field of attack, extremely simple and quite useful!)
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: A_FaceTarget with Pitch
Not without (a lot of) extra work to detect impacts/obstructions properly.
- Xtyfe
- Posts: 1490
- Joined: Fri Dec 14, 2007 6:29 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
Re: A_FaceTarget with Pitch
Balls, well worth a shotNeuralStunner wrote:Not without (a lot of) extra work to detect impacts/obstructions properly.
Re: A_FaceTarget with Pitch
Plus with MD3 models, you can get them to inherit an actor's pitch for more visual benefits.
Re: A_FaceTarget with Pitch
Hello, sorry for the necro, but the link to this mod is dead. Any possibility of re-uploading it?NeuralStunner wrote:For anyone that wants to know what you can do with Pitch through A_FaceTarget: This micro-mod will demonstrate just a few.
Alternatively, a sample DECO of the jumping demon would be appreciated.