Reset angles when out of water
This commit is contained in:
parent
25759bc004
commit
07536bc979
@ -817,6 +817,10 @@ function colorArmor(item)
|
|||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
function resetAngles(part)
|
||||||
|
part.setRot(vectors.of{0,0,0})
|
||||||
|
end
|
||||||
|
|
||||||
function animateTail(val)
|
function animateTail(val)
|
||||||
local chest_rot = 3
|
local chest_rot = 3
|
||||||
local per=2*math.pi
|
local per=2*math.pi
|
||||||
@ -943,6 +947,11 @@ end
|
|||||||
function render(delta)
|
function render(delta)
|
||||||
if aquaticTailVisible() then
|
if aquaticTailVisible() then
|
||||||
animateTail((lerp(old_state.anim_cycle, anim_cycle, delta) * 0.2))
|
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
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user