Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. OrbitCameraController - invert mouse axes

OrbitCameraController - invert mouse axes

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 1.2k Views 2 Watching
  • 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.
  • MarcinXM Offline
    MarcinXM Offline
    MarcinX
    wrote on last edited by
    #1

    Hello Coders,
    Is there a way to invert mouse axes using OrbitCameraController QML Type?

    I just want to use orbit camera more intuitive for user when he/she wants to look around objects placed in the 0,0,0 point (something like in CAD programs or Blender etc). This should look like objects inside my scene are rotating with mouse. I can remember that with simple OpenGL it was possible (and default). Maybe there is other method to achieve what I want with QML (Qt3D)?

    Thanks for help.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hi! Can't test it right now, but from a brief look at qorbitcameracontroller.cpp I'd assume that it's enough to set the linearSpeed and lookSpeed properties to negative value. Default values are:

          , m_linearSpeed(10.0f)
          , m_lookSpeed(180.0f)
      

      So in your QML code, you could try:

      linearSpeed: -10
      lookSpeed: -180
      
      MarcinXM 1 Reply Last reply
      3
      • ? A Former User

        Hi! Can't test it right now, but from a brief look at qorbitcameracontroller.cpp I'd assume that it's enough to set the linearSpeed and lookSpeed properties to negative value. Default values are:

            , m_linearSpeed(10.0f)
            , m_lookSpeed(180.0f)
        

        So in your QML code, you could try:

        linearSpeed: -10
        lookSpeed: -180
        
        MarcinXM Offline
        MarcinXM Offline
        MarcinX
        wrote on last edited by
        #3

        @Wieland Yes! It is working as I want. Thank You so much.

        On the other hand this is the opportunity to remind my other question which is still unresolved :(
        It will be great if someone will find a solution for my problem:
        LINK: Running APPs with Qt3D - need help.

        1 Reply Last reply
        0

        • Login

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