QML box-2d demo example - how to compile
-
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 -
[quote author="Chuck Gao" date="1311949843"]You need build qml-box2d lib/plugin first.[/quote]
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 -
-
hi chuck,
i am not able to run any sample example .i am using box 2d 2.2.1 kindly help me on this .the Error on my code is.
module "Box2D" is not installed
import Box2D 1.0
if you have any sample example so kindly give it you me and also define the steps how to run it .Thanks
Regard
madil. -
hi,
i can put Box 2D where QTSDK installed like(C:\QtSDK\Desktop\Qt\4.7.4\mingw\imports\Box2D_v2.2.1). and i run my project from this "c:\" but this error comesC:\Box2DDemo_v0_2\qmlbox2ddemo\box2ddemo-build-desktop-Qt_4_7_4_for_Desktop_-MSVC2008__Qt_SDK__Debug..\src\qml-box2d\box2dbody.cpp:167: error: C2065: 'M_PI' : undeclared identifier
C:\Box2DDemo_v0_2\qmlbox2ddemo\box2ddemo-build-desktop-Qt_4_7_4_for_Desktop-MSVC2008__Qt_SDK__Debug..\src\qml-box2d\box2dbody.cpp:194: error: C2065: 'M_PI' : undeclared identifier
C:\Box2DDemo_v0_2\qmlbox2ddemo\box2ddemo-build-desktop-Qt_4_7_4_for_Desktop-MSVC2008__Qt_SDK__Debug..\src\qml-box2d\box2dfixture.cpp:204: error: C2057: expected constant expression
C:\Box2DDemo_v0_2\qmlbox2ddemo\box2ddemo-build-desktop-Qt_4_7_4_for_Desktop-MSVC2008__Qt_SDK__Debug..\src\qml-box2d\box2dfixture.cpp:204: error: C2466: cannot allocate an array of constant size 0
C:\Box2DDemo_v0_2\qmlbox2ddemo\box2ddemo-build-desktop-Qt_4_7_4_for_Desktop-_MSVC2008__Qt_SDK__Debug..\src\qml-box2d\box2dfixture.cpp:204: error: C2133: 'vertices' : unknown size