I’m just going through the first few tutorials for Vplay, and I’m having a problem with particles. The StackBox demo works fine, but even when I copy its code into my own experiment, the particle section throws up this error:
“Could not open \qml\Vplay\particles\ParticleVplayInternal.qml for reading. Either the file does not exist or you do not have permissions to open it.”
I already tried various permutations of where to put the .json and .png for the particle. Copying the demo arrangement, they’re in the entities folder which is in the qml folder. I also tried putting them in the assets folder, same error. Current qml file:
import Felgo 3.0
import QtQuick 2.0
import "entities"
GameWindow {
id: gameWindow
onSplashScreenFinished: world.running = true
EntityManager {
id: entityManager
entityContainer: scene
}
Scene {
id: scene
PhysicsWorld {
id: world
running: false
gravity.y: 9.81
z: 10 // draw the debugDraw on top of the entities
// these are performance settings to avoid boxes colliding too far together
// set them as low as possible so it still looks good
updatesPerSecondForPhysics: 60
velocityIterations: 5
positionIterations: 5
// set this to true to see the debug draw of the physics system
// this displays all bodies, joints and forces which is great for debugging
debugDrawVisible: false
}
EntityBase {
entityId: "ground1"
entityType: "ground"
height: 20
width: scene.width
anchors {
bottom: scene.bottom
}
Rectangle {
anchors.fill: parent
color: "white"
}
BoxCollider {
anchors.fill: parent
bodyType: Body.Static
}
}
EntityBase {
entityId: "box1"
entityType: "box"
x: scene.width/2
Image {
id: boxImage
source: "../assets/box.png"
anchors.fill: boxCollider
}
BoxCollider {
id: boxCollider
width: 40
height: 40
anchors.centerIn: parent
fixture.onBeginContact: {
collisionSound.play();
collisionParticleEffect.start();
}
}
SoundEffectVPlay {
id: collisionSound
source: "...assets/test.wav"
}
ParticleVPlay {
id: collisionParticleEffect
fileName: "SmokeParticle.json"
}
}
}
}
…and upon further inspection, the audio isn’t working either, but my main concern at the moment is the particle error.