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
|
@ -75,6 +75,12 @@ public:
|
|||
return m_camera_position;
|
||||
}
|
||||
|
||||
// Returns the absolute position of the head SceneNode in the world
|
||||
inline v3f getHeadPosition() const
|
||||
{
|
||||
return m_headnode->getAbsolutePosition();
|
||||
}
|
||||
|
||||
// Get the camera direction (in absolute camera coordinates).
|
||||
// This has view bobbing applied.
|
||||
inline v3f getDirection() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue