Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Development of a GameController for QtQuick3D
QtWS25 Last Chance

Development of a GameController for QtQuick3D

Scheduled Pinned Locked Moved Unsolved Game Development
1 Posts 1 Posters 189 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    johngod
    wrote on 14 Nov 2024, 07:40 last edited by
    #1

    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/2

    Feel 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.

    1 Reply Last reply
    1

    1/1

    14 Nov 2024, 07:40

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved