A simple system that lowers the viewpoint of the players when they are sneaking.
The systems activates itself, you just need to add the mod to the subgame.
The system can be configured by adding settings to minetest.conf
file.
# If the system should be active or not, defaults to true.
sneakcam_activate = true
# The interval in which the system runs, in seconds, defaults to 0.066.
sneakcam_interval = 0.066
# The offset by which the viewpoing is lowered, defaults to 1.65.
sneakcam_offset = 1.65
You can run the system manually by either invoking sneakcam.update_player_cams
for all players, or by invoking sneakcam.update_player_cam
which accepts
the Player as single argument.
You can force the activation of the system, even if it has been disabled in
the configuration, by invoking sneakcam.activate_internal
.