mirror of
https://github.com/minetest/minetest.git
synced 2025-07-01 23:50:22 +02:00
Camera: Fix shooting line offsets (#9681)
Removes duplicated offset calculations from Game and use whatever the Camera class returns. This keeps the eye position nicely in sync, and gets rid of duplicated code.
This commit is contained in:
@ -135,6 +135,9 @@ public:
|
||||
}
|
||||
|
||||
v3f getPosition() const { return m_position; }
|
||||
|
||||
// Non-transformed eye offset getters
|
||||
// For accurate positions, use the Camera functions
|
||||
v3f getEyePosition() const { return m_position + getEyeOffset(); }
|
||||
v3f getEyeOffset() const;
|
||||
void setEyeHeight(float eye_height) { m_eye_height = eye_height; }
|
||||
|
Reference in New Issue
Block a user