[orx-camera] Center mouse button resets Camera2D
This commit is contained in:
@@ -41,6 +41,8 @@ class Camera2D : Extension, ChangeEvents {
|
|||||||
fun setupMouseEvents(mouse: MouseEvents) {
|
fun setupMouseEvents(mouse: MouseEvents) {
|
||||||
mouse.buttonDown.listen {
|
mouse.buttonDown.listen {
|
||||||
rotationCenter = it.position
|
rotationCenter = it.position
|
||||||
|
|
||||||
|
if (it.button == MouseButton.CENTER) view = Matrix44.IDENTITY
|
||||||
}
|
}
|
||||||
mouse.dragged.listen {
|
mouse.dragged.listen {
|
||||||
if (!it.propagationCancelled) {
|
if (!it.propagationCancelled) {
|
||||||
|
|||||||
Reference in New Issue
Block a user