1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-15 17:35:37 +02: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);