Development of a GameController for QtQuick3D
-
Hi all
I just want to share a GameController that I am working on for QtQuick3D.
It controls a target Node with the Keyboard or with the touch screen, with virtual not visible wheelpad.
It can work like a FPS game camera, the camera has a nice drift effect when moving and rotating the target Node.
See it in action here https://www.youtube.com/watch?v=i3HdaLy1zRc
and here is a code example https://bitbucket.org/joaodeusmorgado/gamecontroller/src/main/The api is very easy to use, you just have to set the View3D camera with the GameController camera and set the GameController target with the Node you want to controll. See the api following example:
View3D { id: view anchors.fill: parent camera: control.camera Node { id: originNode NodeCustomGeometry { id: nodeTarget } }//originNode }//View3D GameController { id: control target: nodeTarget fpsCamera: true // if the camera should act like a fps } }
I am trying to contribute this GameController to the Qt project, see here
https://bugreports.qt.io/browse/QTBUG-130603 and here
https://codereview.qt-project.org/c/qt/qtquick3d/+/602679/2Feel free to send feedback and sugestions, or vote for it in the qt bug tracker, if you think this is a good project.
Thanks and enjoy.