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:
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);
|
||||
|
Reference in New Issue
Block a user