mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Add support for entities to automatic face movement direction
This commit is contained in:
parent
d718b0b34e
commit
fc571ad46d
7 changed files with 18 additions and 1 deletions
|
@ -1210,6 +1210,11 @@ public:
|
|||
m_yaw += dtime * m_prop.automatic_rotate * 180 / M_PI;
|
||||
updateNodePos();
|
||||
}
|
||||
|
||||
if (getParent() == NULL && m_prop.automatic_face_movement_dir){
|
||||
m_yaw = atan2(m_velocity.Z,m_velocity.X) * 180 / M_PI;
|
||||
updateNodePos();
|
||||
}
|
||||
}
|
||||
|
||||
void updateTexturePos()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue