mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +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
10
src/player.h
10
src/player.h
|
@ -102,6 +102,16 @@ public:
|
|||
return m_yaw;
|
||||
}
|
||||
|
||||
f32 getRadPitch()
|
||||
{
|
||||
return -1.0 * m_pitch * core::DEGTORAD;
|
||||
}
|
||||
|
||||
f32 getRadYaw()
|
||||
{
|
||||
return (m_yaw + 90.) * core::DEGTORAD;
|
||||
}
|
||||
|
||||
virtual void updateName(const char *name)
|
||||
{
|
||||
snprintf(m_name, PLAYERNAME_SIZE, "%s", name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue