A_FaceTarget with Pitch

Moderator: GZDoom Developers

Post Reply
User avatar
DavidPH
Posts: 382
Joined: Fri Aug 28, 2009 1:46 pm

A_FaceTarget with Pitch

Post by DavidPH »

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
Attachments
A_FaceTarget.7z
patch for r3445
(1.38 KiB) Downloaded 64 times
User avatar
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

Post by NeuralStunner »

Hooray!

I have a lot of mod features depending on this. *Crosses toes*
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A_FaceTarget with Pitch

Post by Graf Zahl »

added
User avatar
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

Post by NeuralStunner »

Thank you. :D
User avatar
printz
Posts: 2648
Joined: Thu Oct 26, 2006 12:08 pm
Location: Bucharest, Romania
Contact:

Re: A_FaceTarget with Pitch

Post by printz »

And how can non-player pitch be noticeable in Doom?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A_FaceTarget with Pitch

Post by Graf Zahl »

It's only useful for some custom stuff but don't ask me what.
Gez
 
 
Posts: 17942
Joined: Fri Jul 06, 2007 3:22 pm

Re: A_FaceTarget with Pitch

Post by Gez »

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.
User avatar
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

Post by NeuralStunner »

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!)
User avatar
printz
Posts: 2648
Joined: Thu Oct 26, 2006 12:08 pm
Location: Bucharest, Romania
Contact:

Re: A_FaceTarget with Pitch

Post by printz »

Okay... Sounds like it can do a lot of useful stuff...
User avatar
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

Post by Xtyfe »

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!)
The homing soul stuff caught my eye, could something like this be used to recreate the original lost soul attack?
User avatar
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

Post by NeuralStunner »

Not without (a lot of) extra work to detect impacts/obstructions properly.
User avatar
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

Post by Xtyfe »

NeuralStunner wrote:Not without (a lot of) extra work to detect impacts/obstructions properly.
Balls, well worth a shot
User avatar
Nash
 
 
Posts: 17491
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: A_FaceTarget with Pitch

Post by Nash »

Plus with MD3 models, you can get them to inherit an actor's pitch for more visual benefits.
Xabis
Posts: 63
Joined: Wed Mar 06, 2013 7:15 pm

Re: A_FaceTarget with Pitch

Post by Xabis »

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.
Hello, sorry for the necro, but the link to this mod is dead. Any possibility of re-uploading it?

Alternatively, a sample DECO of the jumping demon would be appreciated.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”