mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00: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:
parent
5cbe8437a8
commit
45999b74e6
4 changed files with 30 additions and 23 deletions
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue