From 2b2e0914d4ef06e9e194136b41e07be7371820e0 Mon Sep 17 00:00:00 2001 From: epCode Date: Sun, 20 Dec 2020 14:42:45 -0800 Subject: [PATCH] Added arm pitch control --- mods/PLAYER/mcl_playerplus/init.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index 97e91ad4..d3729e75 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -26,6 +26,13 @@ minetest.register_globalstep(function(dtime) -- controls head bone pitch = degrees(player:get_look_vertical()) * -1 + + if controls.LMB or controls.RMB then + player:set_bone_position("Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(pitch,0,0)) + else + player:set_bone_position("Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(0,0,0)) + end + if controls.sneak then player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch+36,0,0)) if player:get_properties().collisionbox ~= {-0.35,0,-0.35,0.35,1.40,0.35} then