Page 1 of 1

[All] Player bobbing in air

Posted: Mon Jun 01, 2009 4:38 am
by Cherepoc
I don't know if it is a bug, or not. While in the air, the player is still bobbing. You can notice it even when you do regular jumps, but if you jump in a sector with low gravity, it looks really weird. Also, it doesn't looking good when player is swimming, but at least, it's not so weird.
As I remember, Legacy players weren`t bobbing both in air and water.
Can bobbing be removed while jumping/swimming?

Re: [All] Player bobbing in air

Posted: Mon Jun 01, 2009 6:10 am
by Jimmy
I take it you mean weapon bobbing and not view bobbing?

Re: [All] Player bobbing in air

Posted: Mon Jun 01, 2009 6:56 am
by Rachael
Or could you also possibly mean the player himself, when viewed by an external camera?

Re: [All] Player bobbing in air

Posted: Mon Jun 01, 2009 7:22 am
by Enjay
I think he means weapon bobbing - if so, why shouldn't the weapon bob when you are moving - even if it is a jump or a swim? Personally, I think that looks much better than suddenly not moving - especially if it snapped to a neutral central position from wherever it was on the bob when the jump (etc) started. I know that I'd find it difficult to hold a weapon absolutely steady when jumping or swimming. :P

The Doom weapon bob is a pretty primitive sway animation that, IMO, looks equally bad and good in all the circumstances mentioned.

Re: [All] Player bobbing in air

Posted: Mon Jun 01, 2009 8:17 am
by Cherepoc
No, I mean player camera. Just set low gravity, run and then jump. This looks like player is walking in the air.

Re: [All] Player bobbing in air

Posted: Mon Jun 01, 2009 8:23 am
by Gez
Build a two-sector map in vanilla. A square sector neighboring another square sector, with as large a height difference between both floors as the engine will allow, but the same ceiling height. Put the player start on the high floor sector. Run from it and fall down to the low floor sector. During the fall, keep moving forward and look if you are bobbing or not.

Re: [All] Player bobbing in air

Posted: Mon Jun 01, 2009 8:48 am
by Cherepoc
It's bobbing. It's difficult to notice that with normal gravity, with low it's definitely bobbing

Re: [All] Player bobbing in air

Posted: Mon Jun 01, 2009 9:26 am
by Gez
I mean, does it bob in plain old vanilla DOOM.EXE too?

Re: [All] Player bobbing in air

Posted: Mon Jun 01, 2009 10:12 am
by Cherepoc
Looks like it does... But I can't say for sure. It's hard to find that out without low gravity

Re: [All] Player bobbing in air

Posted: Wed Jun 03, 2009 10:58 am
by Cherepoc
Another interesting fact. When turning on nogravity flag, camera will bob when player standing on ground, but won't bob while player is in air. That's the right behaviour=)
That also works for vanilla.

Re: [All] Player bobbing in air

Posted: Tue Jun 16, 2009 9:10 am
by Cherepoc
I'm not experienced in fixing bugs. I don't even know how to make code patches(posted in code submissions). However, I found this in p_user.cpp (zdoom 2.3.1 src)

line 1513: void P_CalcHeight (player_t *player)
___blah blah___
line 1528: if ((player->mo->flags & MF_NOGRAVITY) && !onground)

Cheks if player isn't standing on ground and have NOGRAVITY flag. So, this turns off movement bobbing if player have nogravity flag (by entering fly cheat for example) AND is in air. Shouldn 't that be changed to something like this?

if (((player->mo->flags & MF_NOGRAVITY) && !onground) || !onground)

So it checks if player is in air with nogravity flag set, or simply when he is in air.
EDIT. Wait, isn't that just

if ( !onground)

My maths is sooo bad...
I can't test this right now, I'm downloading vc++ and stuff, so it will take some days.

EDIT2:
(needs to be calculated for gun swing even if not on ground)
Damn... Is it really needed even if not on ground?

Re: [All] Player bobbing in air

Posted: Tue Jun 23, 2009 8:56 pm
by Gez
Well, the player might be walking on bridges or other non-ground things.

Re: [All] Player bobbing in air

Posted: Wed Jun 24, 2009 3:11 am
by Cherepoc
The main problem is "weapon bobbing weirdness". Use fly cheat - fly in air, then on ground and look at the weapon. To fix movement bobbing bug the weapon bobbing code must be rewritten. :(

Re: [All] Player bobbing in air

Posted: Wed Dec 16, 2009 2:24 am
by Graf Zahl
Why was still here? :?

Re: [All] Player bobbing in air

Posted: Wed Dec 16, 2009 3:20 am
by Cutmanmike
I wouldn't actually mind a way to turn that bobbing off if possible. Maybe through setplayerproperty with a set of 2?