Mouse drag on specific area.
-
Hello, I
m doing it again. Next game with another challenge for my 1 month Qt expirience. I have to make a train moving on the trails: https://www.flickr.com/photos/heatblazer/15453957743/ The picture shows the trails. The user must drag the train in the exact trails, no other space. I
ve predefined invisible curves to match the rails so collision deteciton is OK. But this is the test picture, the final one will have a choice of the roads so I need to know what classes will I need. Just point me the way, I`ll to it on my own from there on. -
Hi,
Sounds like you should either use the QGraphicsScene framework or QML
-
I am using QGraphicsScene. The queston is if there is an API to move the train on the rails with curves so if user drags up and there is a curved rail, the train must curve there too even the mouse is not.
[quote author="SGaist" date="1419200763"]Hi,Sounds like you should either use the QGraphicsScene framework or QML[/quote]
-
If I can add invisible boundries, will the user be forced to curve to them? I wonder.
-
Makes me think of "collidesWithPath":http://doc.qt.io/qt-5/qgraphicsitem.html#collidesWithPath
Note that I haven't used it