From 07536bc979b1d1a7b8a0c00b52b4ade2b7bc0f2b Mon Sep 17 00:00:00 2001 From: NullBite Date: Fri, 25 Mar 2022 12:29:53 -0400 Subject: [PATCH] Reset angles when out of water --- script.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/script.lua b/script.lua index d896526..eccafa5 100644 --- a/script.lua +++ b/script.lua @@ -817,6 +817,10 @@ function colorArmor(item) end -- }}} +function resetAngles(part) + part.setRot(vectors.of{0,0,0}) +end + function animateTail(val) local chest_rot = 3 local per=2*math.pi @@ -943,6 +947,11 @@ end function render(delta) if aquaticTailVisible() then animateTail((lerp(old_state.anim_cycle, anim_cycle, delta) * 0.2)) + else + resetAngles(model.Body) + resetAngles(vanilla_model.TORSO) + resetAngles(vanilla_model.JACKET) + resetAngles(armor_model.CHESTPLATE) end end -- }}}