Changed: MC Mod

Changed: MC Mod

156k Downloads

Physics based model parts sometimes jitter

LtxProgrammer opened this issue ยท 2 comments

commented

Occasionally, tails and tentacles will jitter around. The tail drag and spring physics are only computed on the client side, so it can't be from network lag. I think it's from a bad lerp call.

commented

I've figured out that this occurs over time, as the game runs for longer. When the tickCount for an entity gets too large, ageInTicks = tickCount + partialTicks produces a floating point number where the precision in the decimal location drops significantly. This causes Mth.positiveModulo(ageInTicks, 1.0f) to be imprecise in nature, despite the float being reset to a range of [0, 1].

commented

Having a hard time reproducing this issue now, even though the code was not changed.