Make mermaid tail move less when seated

This commit is contained in:
NullBite 2023-10-21 02:38:22 -04:00
parent cbc79e9d94
commit 16f2464144
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A

View File

@ -607,6 +607,7 @@ end
function animateMTail(val)
local chest_rot = 3
local period=2*math.pi
local amplitude_multiplier=1
-- TODO vanilla model manipulation broke, add chestplate model
-- armor_model.CHESTPLATE:setRot(vec( -wave(val, period, math.rad(3)), 0, 0 ))
-- this makes it work with partial vanilla
@ -614,18 +615,20 @@ function animateMTail(val)
-- vanilla_model.JACKET:setRot(vec( -wave(val, period, math.rad(3)), 0, 0 ))
if player:getVehicle() then
period=4*math.pi
amplitude_multiplier=0.33
TAIL_BONES[1]:setRot(vec(85,0,0))
else
resetAngles(model.Body)
model.Body:setRot(vec( wave(val, period, 3), 0, 0 ))
model.Body.LeggingsTopTrimF:setRot(vec( wave(val-1, period, 4), 0, 0 ))
model.Body.LeggingsTopTrimB:setRot(vec( wave(val-1, period, 4), 0, 0 ))
TAIL_BONES[1]:setRot(vec( wave(val-1, period, 7), 0, 0 ))
model.Body:setRot(vec( wave(val, period, 3*amplitude_multiplier), 0, 0 ))
model.Body.LeggingsTopTrimF:setRot(vec( wave(val-1, period, 4*amplitude_multiplier), 0, 0 ))
model.Body.LeggingsTopTrimB:setRot(vec( wave(val-1, period, 4*amplitude_multiplier), 0, 0 ))
TAIL_BONES[1]:setRot(vec( wave(val-1, period, 7*amplitude_multiplier), 0, 0 ))
end
TAIL_BONES[2]:setRot(vec( wave(val-2, period, 8), 0, 0 ))
TAIL_BONES[3]:setRot(vec( wave(val-3, period, 12), 0, 0 ))
TAIL_BONES[4]:setRot(vec( wave(val-4, period, 15), 0, 0 ))
TAIL_BONES[2]:setRot(vec( wave(val-2, period, 8*amplitude_multiplier), 0, 0 ))
TAIL_BONES[3]:setRot(vec( wave(val-3, period, 12*amplitude_multiplier), 0, 0 ))
TAIL_BONES[4]:setRot(vec( wave(val-4, period, 15*amplitude_multiplier), 0, 0 ))
end
tail_original_rot={}
for k, v in ipairs(REG_TAIL_BONES) do