mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-19 09:31:07 +01:00
Added arm pitch control
This commit is contained in:
parent
c5412dd2a7
commit
2b2e0914d4
1 changed files with 7 additions and 0 deletions
|
@ -26,6 +26,13 @@ minetest.register_globalstep(function(dtime)
|
||||||
|
|
||||||
-- controls head bone
|
-- controls head bone
|
||||||
pitch = degrees(player:get_look_vertical()) * -1
|
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
|
if controls.sneak then
|
||||||
player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch+36,0,0))
|
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
|
if player:get_properties().collisionbox ~= {-0.35,0,-0.35,0.35,1.40,0.35} then
|
||||||
|
|
Loading…
Reference in a new issue