mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-15 08:15:38 +07:00
Merge pull request #72 from enduro2d/hotfix/camera_view_fix
This commit is contained in:
@@ -410,7 +410,7 @@ namespace e2d
|
||||
|
||||
void node::update_world_matrix_() const noexcept {
|
||||
world_matrix_ = parent_
|
||||
? parent_->world_matrix() * local_matrix()
|
||||
? local_matrix() * parent_->world_matrix()
|
||||
: local_matrix();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,14 @@ namespace e2d { namespace render_system_impl
|
||||
: render_(render)
|
||||
, batcher_(batcher)
|
||||
{
|
||||
const m4f& m_v = cam_n ? cam_n->world_matrix() : m4f::identity();
|
||||
const m4f& cam_w = cam_n
|
||||
? cam_n->world_matrix()
|
||||
: m4f::identity();
|
||||
const std::pair<m4f,bool> cam_w_inv = math::inversed(cam_w);
|
||||
|
||||
const m4f& m_v = cam_w_inv.second
|
||||
? cam_w_inv.first
|
||||
: m4f::identity();
|
||||
const m4f& m_p = cam.projection();
|
||||
|
||||
batcher_.flush()
|
||||
|
||||
Reference in New Issue
Block a user