Project Zomboid

Project Zomboid

Fancy Handwork
BOBcat 19 Apr, 2023 @ 2:50pm
[BUG] Character turns it's lower body too early to face the cursor while aiming with pistols
In the base game, when aiming, the angle when the character starts turning it's lower body to face the cursor is about 70 degrees. This mod lowers that to about 10 degrees when aiming with pistols.

This causes jerky motion in character animation and messes with aiming mechanics.

What I did / Steps to reproduce:
1-Enable debug
2-Enable only this mod
3-Restart the game
4-Start a new game
5-Spawn a pistol
6-Aim and slowly turn around
7-See that the character tries to align it's lower body to where the cursor is too early.

Notes:
-This problem doesn't exist while unarmed/using melee/using rifles.
-Sandbox options to delay/disable forced turning has no effect.
Last edited by BOBcat; 19 Apr, 2023 @ 2:53pm
< >
Showing 1-2 of 2 comments
dhert  [developer] 8 Jun, 2023 @ 12:15pm 
Heya! Sorry for the very long delay in my response, been really busy of late. I'm finally starting to get back into the groove of modding and wanted to take a look at this.

Very interesting thing you found, and unfortunately, this looks to be an issue with the game itself and how Animation Masks are used. When you begin to turn, the animation mask is removed and re-applied; this seems to break the current animation state and causes your character to start the turn animation instead of just rotating their upper body. Almost all animation "fixes" being applied here are animation masks, as the alternative would be to replace all animation files which is a lot to say the least. Player movement, aiming, and the current animation state is controlled in the Java core, I cannot fix this via a mod in Lua.

With Fancy Handwork disabled, you can easily reproduce this same issue by aiming a pistol while holding a bag in your left hand.

I could potentially fix this for when you are just aiming a pistol in the main hand by not re-applying the mask, however, holding any item in your left hand would still cause this issue currently.
Маттоsо 21 Jul, 2023 @ 7:48am 
Doesn't affect my gameplay negatively though. Visual bugs without any gameplay break isn't really that bad. Hopefully this can be fixed in the future when the game engine improves though.
< >
Showing 1-2 of 2 comments
Per page: 1530 50