<div>
<div id=”x_divtagdefaultwrapper” dir=”ltr”>
<div>Hi to everyone,
I have problems with V-play.
<div></div>
<div>I downloaded and intalled it, but the program, that I had developed in qml previously, send an error when I try to run it. that is the error: Type PhysicsWorld unavailable, World is not a type. I dont know how to fix it.</div>
<div></div>
<div>I told you, I’m trying to do a kind of Angry Birds game, so in my program I have “boxes” and the “bird” so sometimes the bird are going to collide with the boxes and these have to move.</div>
<div></div>
<div>I send you a part of my program maybe you can help me. (I was checking the BoxCollision on the official page) Also, I have to say I can run other Felgo Demos that use PhysicsWorld.</div>
<div></div>
<div>GameWindow {//definición de la pantalla de juego como pantalla completa.id: windowvisible: truevisibility: "FullScreen"</div>
<div></div>
<div></div>
<div>//fondo del juegoBackground{id: backgroundheight: parentwidth: parent}//posición y velocidad inicial del pollito.Bird{id: birdx: 100y: 550z: 1property double vx: move.vi*Math.cos(move.tita)property double vy: move.vi*Math.sin(-move.tita)Behavior on x{ //el tiempo que va a tardar en moverse en cada iteracción en el eje xNumberAnimation{duration: 10}}Behavior on y{ //el tiempo que va a tardar en moverse en cada iteracción en el eje yNumberAnimation{duration:10}}}Box{id:boxx:1100y:625}PhysicsWorld{gravity.y: -3}Scene{EntityBase {entityId: "box1"entityType: "box"}Image{id: boxImagesource: "img/box.png"}BoxCollider{friction: 0.2restitution: 0bodyType: Body.Dynamicbullet:falseangularDamping: 0linearDamping: 0fixedRotation: falselinearVelocity: Qt.point(100,0)anchors.fill:boxImagefixture.onBeginContact: {boxImage.opacity=0.5}}}</div>
<div>
<div>}</div>
</div>
</div>
</div>
</div>
-
AuthorPosts
-
April 24, 2017 at 12:22 #16146
Patricia
April 24, 2017 at 15:48 #16148
GüntherFelgo TeamHi!
If you are interested in how to add Felgo to your existing Qt Quick Application, you can have a look at this related post:
https://felgo.com/developers/forums/t/can-we-use-v-play-components-in-a-qt-quick-controls-2-applicationI also followed up with you on the email that you sent to our support regarding this issue.
Cheers,
GTApril 26, 2017 at 09:54 #16153
Patricia
Hi, Günther
Now, I can build the program but it send me lots of errors like:
—->WARNING: Can’t find config.json file
I have a new file config.json and inside you can read this:
"title": "qt_game",
"identifier": "com.yourcompany.wizardEVP.qt_game",
"orientation": "auto",
"versioncode": 1,
"versionname": "1.0",
"stage": "test"
}
I’m not sure if the dates that I put are ok. For example, I don’t know how get the identifier, I copied it from other program and I only changed the name of the project.
Second error—-> qrc:/main.qml:410:9: QML BoxCollider: Cannot anchor to an item that isn’t a parent or sibling.
Third error —–> qrc:///qml/VPlay/core/EntityBase.qml:573:3: QML Connections: Cannot assign to non-existent property “onEntityManagerDestroyed”
libpng warning: iCCP: known incorrect sRGB profile
ERROR: Invalid license key set for plugin: “VPlay” “2.0”
qml: WARNING: EntityBase: you did not set an entityType for the entity EntityBase_QMLTYPE_119(0x398d0c80) with entityId – to be able to distinguish your entities set the entityType!
Fourth error—-> qrc:///qml/VPlay/core/EntityBase.qml:530: ReferenceError: entityManager is not defined
qt.network.ssl: QSslSocket: cannot resolve SSL_set_alpn_protos
qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_alpn_select_cb
qt.network.ssl: QSslSocket: cannot resolve SSL_get0_alpn_selected
QWidget: Cannot create a QWidget without QApplication
QWaitCondition: Destroyed while threads are still waiting
Thank you a lot for your help
April 26, 2017 at 10:11 #16154
GüntherFelgo TeamHi!
The config.json file is automatically found if placed in correct path, did you already have a look at the Example QtQuick Project with a working Felgo Integration? (It was also mentioned in a reply to the above topic)
When running the example project, the config.json warning should not occur – does the example work for you? If yes, please adjust your project settings to match the example project.Regarding BoxCollider, Entities and EntityManager usage, please consider having a look at our getting started tutorials. You are probably missing the
EntityManager { id: entityManager }
Item in your QML and might have an incorrect Parent/Child setup for your items that use EntityBase / BoxCollider.
Best,
GüntherApril 26, 2017 at 12:16 #16155
Patricia
I don’t know how to fix these Errors:
—>WARNING: Can’t find config.json file (I put every file in the same way that the QtQuickPlay.pro you said me)
—>ERROR: Invalid license key set for plugin: “VPlay” “2.0” (I paste the code that I found in vplay_license.key but it doesnt work)
Really I dont know that Im doing wrong…
Sorry, Im new in this kind of program.
thanks
April 26, 2017 at 12:30 #16156
Patricia
I forgot to say you that the example works for me.
April 26, 2017 at 12:42 #16157
Patricia
I could fix the license error, so now the only error that I have is the first one I wrote.
April 26, 2017 at 12:59 #16158
GüntherFelgo TeamI guess you are referring to the config.json issue?
Please make sure that the config.json file is placed correctly within your project folder structure and that your .qrc resources file references this file. You can compare your project structure and setup with the example project from before (*.pro project configuration, *.qrc resources file setup, initialization in main.cpp, etc …).
If you are new to Felgo and have troubles with including Felgo in your QML project, you can also try it the other way round:
Create a new and empty Felgo project (which is correctly set up) or use the example Qt Quick project (which works) and then add your custom project code to this new project.Best,
Günther from FelgoApril 28, 2017 at 11:18 #16163
Patricia
I fixed it thank you!!!!
You must be logged in to reply to this topic.