littlektframework / littlekt

A multiplatform WebGPU 2D game framework written in Kotlin. Build your own game engine on top.
https://littlekt.com
Apache License 2.0
321 stars 12 forks source link

SceneGraph `InputEvent` doesn't take intto account viewports when converting scene coordinates to world coordinates #203

Closed LeHaine closed 1 year ago

LeHaine commented 1 year ago

The input coordinates that a node receives in onInput when using a viewport that isn't the root is still the root viewports coordinates. Need a way to determine the canvas isn't the root and convert the scene coordinates to the viewports coordinates and any nested viewports so that it always receives the correct scene and local coordinates.

LeHaine commented 1 year ago

Fixed in #206