mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Add offset to automatic_face_movement_dir
This commit is contained in:
parent
681e136d5f
commit
4feea0ac68
7 changed files with 24 additions and 8 deletions
|
@ -1211,8 +1211,9 @@ public:
|
|||
updateNodePos();
|
||||
}
|
||||
|
||||
if (getParent() == NULL && m_prop.automatic_face_movement_dir){
|
||||
m_yaw = atan2(m_velocity.Z,m_velocity.X) * 180 / M_PI;
|
||||
if (getParent() == NULL && m_prop.automatic_face_movement_dir &&
|
||||
(fabs(m_velocity.Z) > 0.001 || fabs(m_velocity.X) > 0.001)){
|
||||
m_yaw = atan2(m_velocity.Z,m_velocity.X) * 180 / M_PI + m_prop.automatic_face_movement_dir_offset;
|
||||
updateNodePos();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue