mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Add get_look_dir(), get_look_pitch() and get_look_yaw() for players
This commit is contained in:
parent
ad4040d982
commit
7937813c98
4 changed files with 107 additions and 35 deletions
|
@ -2,6 +2,21 @@
|
|||
-- Experimental things
|
||||
--
|
||||
|
||||
-- For testing random stuff
|
||||
|
||||
function on_step(dtime)
|
||||
-- print("experimental on_step")
|
||||
--[[
|
||||
print("celeron55 dir: "..dump(
|
||||
minetest.env:get_player_by_name("celeron55"):get_look_dir()))
|
||||
print("celeron55 pitch: "..dump(
|
||||
minetest.env:get_player_by_name("celeron55"):get_look_pitch()))
|
||||
print("celeron55 yaw: "..dump(
|
||||
minetest.env:get_player_by_name("celeron55"):get_look_yaw()))
|
||||
--]]
|
||||
end
|
||||
minetest.register_globalstep(on_step)
|
||||
|
||||
-- An example furnace-thing implemented in Lua
|
||||
|
||||
minetest.register_node("experimental:luafurnace", {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue