Page 1 of 1

Recoil?

Posted: Thu Jun 21, 2012 10:06 am
by Hece
Is there any way to make recoil whitout ACS?

RE: Recoil?

Posted: Thu Jun 21, 2012 10:47 am
by Dark-Assassin

RE: Recoil?

Posted: Thu Jun 21, 2012 11:46 am
by Ænima
http://zdoom.org/wiki/A_SetPitch

I'd recommend the ACS method though because it's much more flexible.

RE: Recoil?

Posted: Thu Jun 21, 2012 12:24 pm
by XutaWoo
Ænima wrote: http://zdoom.org/wiki/A_SetPitch

I'd recommend the ACS method though because it's much more flexible.
Only if you don't know what you're doing. :V

...

Okay it still involves ACS but I'm pretty sure A_SetPitch will be able to be predicted easier by Zandornum soooo.

RE: Recoil?

Posted: Thu Jun 21, 2012 2:09 pm
by Ivan
A_SetPitch is not even on Zandronum. It's kind of unclear what he asks for, really. You can use SetActorPitch for the pitch one or what Dark-Assassin said for the kickback.

RE: Recoil?

Posted: Thu Jun 21, 2012 2:18 pm
by Ænima
XutaWoo wrote:
Ænima wrote: http://zdoom.org/wiki/A_SetPitch

I'd recommend the ACS method though because it's much more flexible.
Only if you don't know what you're doing. :V
By "flexible" I mean you can give your recoil its own function and do stuff like I did and make it so players can scale or toggle it based on their prefrences. :V

RE: Recoil?

Posted: Thu Jun 21, 2012 2:52 pm
by Minigunner
-=Dark-Assassin=- wrote: A_Recoil?
A_Recoil (force * cos(pitch))
Because the current one does not account for pitch. At all.

RE: Recoil?

Posted: Fri Jun 22, 2012 3:29 am
by XutaWoo
Minigunner wrote:
-=Dark-Assassin=- wrote: A_Recoil?
A_Recoil (force * cos(pitch))
Because the current one does not account for pitch. At all.
...That'll send people backwards or forward depending on whether they're looking up or down. :neutral:

RE: Recoil?

Posted: Fri Jun 22, 2012 3:36 am
by Ijon Tichy
no, cos starts at 1, so it works
cos(45°) == sqrt(2) // == -0.125 pitch
cos(-45°) == sqrt(2) // == 0.125 pitch

RE: Recoil?

Posted: Fri Jun 22, 2012 3:16 pm
by XutaWoo
Oh, okay.

...you'd still want to use an ACS script or wait for A_ChangeVelocity, because it doesn't make sense to have three-dimensional recoil that only affects the player on the two-dimensional plane.

RE: Recoil?

Posted: Fri Jun 22, 2012 5:10 pm
by Minigunner
I also use ThrustThingZ with 8x the force and with sin(pitch) instead of cos(pitch).