QML box-2d demo example - how to compile
Page |
1 |
I found qml box 2d demo at
https://projects.developer.nokia.com/qmlbox2ddemo
I also saw a question in the ‘discussion’ for which I too wanted an answer Could some one answer this – I found that the project has been put up by Digia employee so I thought I will cut and paste the question here
*
Hi Running the project just shows a blank screen . Could you explain how to use this project ? I also find that
anchors.fill: parent , density: 1; friction: 0.4; restitution: 0.5; are all shown as ‘Not a valid name’.
Can you explain how to compile this project
thanks in advance*
17 replies
You need build qml-box2d lib/plugin first. You can get the source code from“gitorious”:https://gitorious.org/qml-box2d
There also have qml-box2d demos :D
Thanks.In the intervening time between my question and your answer, I did include the path in pro file and the project SEEMS to have compiled but I still get a blank screen. The error corresponding to ‘fixtures in Box 2d’ density, friction and restitution still persist.
FOR eg-
- fixtures: Box {
- anchors.fill: parent
- density: 1;
- friction: 0.4;
- restitution: 0.5;
- }
All the above are shown as ‘not a valid property name’
Thanks for your answers. Hope you may be able to figure out the error
Thank you for helping thus far. I have washed my hands off Box2d and switched over to Bullet physics which I could compile and use with no hassle. Thanks again
If any one is interested, do check out QML and Bullet Physics integration here
https://bitbucket.org/jtoivola/qml-physics/downloads
You need build qml-box2d lib/plugin first.
How can I build the plugin ?
I found box2d.pro file, opened and when I click Run it opens a window that asks for an executable (“Could not find the executable, please specify one.”, with 3 fields: Executable, Arguments, WD).
I also tried to copy the plugin directory in my project file and then use import in my QML files but with no luck: module not installed
I’m from hours on google, forums, docs but find nothing that really helps me.
Can someone explain step-by-step how he installed the Box2D plugin successfully ?
Thanks a lot, in advance
You must log in to post a reply. Not a member yet? Register here!


