Apply Linear Impulse using Box2d in QML
-
Hello All,
I am in a process of developing a game using Box2d physics engine. I am stuck in a situation, in which I need to apply linear impulse on a component/body (game character) that is created using Qt Quick in qml file. Kindly guide me how to apply Linear impulse on that Body, Thanks in advance
Regards,
Ali Abbas -
Hello All,
I have found the way to apply Linear Impulse. My object name is 'strikerBody' and I used the following command to do it
strikerBody.applyLinearImpulse(Qt.point(0, -100), Qt.point(0,0))
Regards,
Ali Abbas -
I never really thought of using Box2D with QML. Can you write a small guide, for e.g. Moving an object.
-
Dear Raja,
You can find some help from the following demo projects. Later as I have some time I'll write a helping page.
https://projects.developer.nokia.com/qmlbox2ddemo
https://projects.developer.nokia.com/mototrialracer
I am using the first one demo for my project
Regards,
Ali Abbas -
I already know about this, but I'm looking for a very basic tutorial. It would be useful only when they know about Box2D I think.