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. Collision detection using qt quick
Forum Updated to NodeBB v4.3 + New Features

Collision detection using qt quick

Scheduled Pinned Locked Moved QML and Qt Quick
10 Posts 6 Posters 6.8k Views 1 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.
  • I Offline
    I Offline
    imrrk
    wrote on last edited by
    #1

    Hi friends..,I want to knoe whether collision detection is possible in qt quick .
    a simple ex:
    I want to move 1 ball by hiting it with another ball.

    Thanks
    imrrk

    1 Reply Last reply
    0
    • K Offline
      K Offline
      krishkn
      wrote on last edited by
      #2

      Ther r some new physics lab packages which could be used for thes kinda collision or else javaScript has some kinda Rectangl collision detection API.

      Regards,
      Krishkn

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Kxyu
        wrote on last edited by
        #3

        Math.sqrt((ball1.x-ball2.x)(ball1.x-ball2.x)+(ball1.y-ball2.y)(ball1.y-ball2.y))<epsilon

        Pythagoras will help you)

        1 Reply Last reply
        1
        • K Offline
          K Offline
          kamalakshantv
          wrote on last edited by
          #4

          A little searching on would have helped. It is already discussed "here":http://developer.qt.nokia.com/forums/viewthread/1695.

          1 Reply Last reply
          0
          • I Offline
            I Offline
            imrrk
            wrote on last edited by
            #5

            hi krishkn where i will get this pysics lab packages

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              Did you study the QML arcade tennis example?

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kamalakshantv
                wrote on last edited by
                #7

                [quote author="Andre" date="1294136161"]Did you study the QML arcade tennis example?[/quote]

                Referring to the" TV Tennis ":http://doc.qt.nokia.com/4.7-snapshot/declarative-toys-tvtennis.htmlexample.

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  andre
                  wrote on last edited by
                  #8

                  This would be the working link: "http://doc.qt.nokia.com/latest/declarative-toys-tvtennis.html":http://doc.qt.nokia.com/latest/declarative-toys-tvtennis.html

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    krishkn
                    wrote on last edited by
                    #9

                    u need to download those from the codebase and compile urself say something like 2DBox.... but its simple to right logic WRT to collision detection for two rectangles....as i mentioned in this link

                    http://developer.qt.nokia.com/forums/viewthread/3001/

                    :)

                    Regards,
                    Krishkn

                    1 Reply Last reply
                    0
                    • 2 Offline
                      2 Offline
                      2beers
                      wrote on last edited by
                      #10

                      hi you can use qt quick with box2d. I never tried but I found it by accident a few days ago:
                      http://www.youtube.com/watch?v=5e3-XZFYMnk

                      plugin: http://gitorious.org/qml-box2d

                      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