1
0
Fork 0
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:
Perttu Ahola 2011-12-28 17:34:07 +02:00
parent ad4040d982
commit 7937813c98
4 changed files with 107 additions and 35 deletions

View file

@ -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);