Mojira Archive
MCPE-122663

Player model isn't centered when swimming

The swimming animation was changed in 1.13 due to the player model being made data driven. However, it wasn't centered correctly.

To fix this, simply change the root position in the swimming animation from this...

"position" : [ 0.0, "(math.sin(query.target_x_rotation) * 24.0 + 3.0) * variable.swim_amount", "(math.cos(query.target_x_rotation) * 24.0 + 9.0) * variable.swim_amount" ]

to this.

"position" : [ 0.0, "17.0 + math.sin(math.lerp(-90.0, query.target_x_rotation, variable.swim_amount)) * 17.0 - 12.0 * variable.swim_amount", "math.cos(math.lerp(-90.0, query.target_x_rotation, variable.swim_amount)) * 17.0" ]

I have attached some pictures of how the animation plays on Java Edition, how it is on Bedrock and how it looks with the fix applied.

Notes: There's also some minor offset seen when the player is facing upwards or downwards, but taking these pictures takes time. The suggested fix addresses that too.

Unresolved

[Mod] LateLag

2021-03-26, 04:26 AM

2023-05-26, 06:47 AM

13

6

Confirmed

497281

1.20.10.20 Preview - 1.19.631.20.10.20 Preview, 1.19.70.24/25 Preview, 1.18.30.23 Preview, 1.18.30.22 Beta, 1.16.230.50 Beta, 1.16.210, 1.18.12 Hotfix, 1.19.63

1.20.10.20 Preview