Add curve to mermaid tail dependant on seat
This commit is contained in:
parent
16f2464144
commit
4a671d8f21
13
script.lua
13
script.lua
@ -608,13 +608,18 @@ function animateMTail(val)
|
|||||||
local chest_rot = 3
|
local chest_rot = 3
|
||||||
local period=2*math.pi
|
local period=2*math.pi
|
||||||
local amplitude_multiplier=1
|
local amplitude_multiplier=1
|
||||||
|
local curve=0
|
||||||
-- TODO vanilla model manipulation broke, add chestplate model
|
-- TODO vanilla model manipulation broke, add chestplate model
|
||||||
-- armor_model.CHESTPLATE:setRot(vec( -wave(val, period, math.rad(3)), 0, 0 ))
|
-- armor_model.CHESTPLATE:setRot(vec( -wave(val, period, math.rad(3)), 0, 0 ))
|
||||||
-- this makes it work with partial vanilla
|
-- this makes it work with partial vanilla
|
||||||
-- vanilla_model.BODY:setRot(vec( -wave(val, period, math.rad(3)), 0, 0 ))
|
-- vanilla_model.BODY:setRot(vec( -wave(val, period, math.rad(3)), 0, 0 ))
|
||||||
-- vanilla_model.JACKET:setRot(vec( -wave(val, period, math.rad(3)), 0, 0 ))
|
-- vanilla_model.JACKET:setRot(vec( -wave(val, period, math.rad(3)), 0, 0 ))
|
||||||
|
|
||||||
if player:getVehicle() then
|
local vehicle = player:getVehicle()
|
||||||
|
if vehicle then
|
||||||
|
if vehicle:getType() ~= "create:seat" then
|
||||||
|
curve=22
|
||||||
|
end
|
||||||
period=4*math.pi
|
period=4*math.pi
|
||||||
amplitude_multiplier=0.33
|
amplitude_multiplier=0.33
|
||||||
TAIL_BONES[1]:setRot(vec(85,0,0))
|
TAIL_BONES[1]:setRot(vec(85,0,0))
|
||||||
@ -626,9 +631,9 @@ function animateMTail(val)
|
|||||||
TAIL_BONES[1]:setRot(vec( wave(val-1, period, 7*amplitude_multiplier), 0, 0 ))
|
TAIL_BONES[1]:setRot(vec( wave(val-1, period, 7*amplitude_multiplier), 0, 0 ))
|
||||||
end
|
end
|
||||||
|
|
||||||
TAIL_BONES[2]:setRot(vec( wave(val-2, period, 8*amplitude_multiplier), 0, 0 ))
|
TAIL_BONES[2]:setRot(vec( wave(val-2, period, 8*amplitude_multiplier) + curve, 0, 0 ))
|
||||||
TAIL_BONES[3]:setRot(vec( wave(val-3, period, 12*amplitude_multiplier), 0, 0 ))
|
TAIL_BONES[3]:setRot(vec( wave(val-3, period, 12*amplitude_multiplier) + curve, 0, 0 ))
|
||||||
TAIL_BONES[4]:setRot(vec( wave(val-4, period, 15*amplitude_multiplier), 0, 0 ))
|
TAIL_BONES[4]:setRot(vec( wave(val-4, period, 15*amplitude_multiplier) + curve, 0, 0 ))
|
||||||
end
|
end
|
||||||
tail_original_rot={}
|
tail_original_rot={}
|
||||||
for k, v in ipairs(REG_TAIL_BONES) do
|
for k, v in ipairs(REG_TAIL_BONES) do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user