Forums

OverviewV-Play 1 SupportParticles z-ordering › Reply To: Particles z-ordering

OverviewV-Play 1 SupportParticles z-ordering › Reply To: Particles z-ordering
#4387

Christian
V-Play Team

Hey Chris,

 

thanks for your answer. It doesn’t seem to be working when putting the particles on the same file as the SpriteBatchContainer above it and modifying the z-property. Here is how i tried it in my BaseLevel.qml:

property variant particleItem

GemParticles {
  id: gemParticles
  z: particleItem ? particleItem.z : 0
  type: particleItem ? particleItem.type : 1
  pos.x: particleItem ? particleItem.x + particleItem.width / 2 : 0
  pos.y: particleItem ? particleItem.y + particleItem.width * 2 / 5 : 0
}

SpriteBatchContainer {}

function startGemParticles(item) {
  if(window.isParticlesEnabled()) {
    gemParticles.stop()
    gemParticles.stopLivingParticles()
    particleItem = item
    gemParticles.start()
  }
}

But all particles are still drawn above everything.

When I use vertexZ, i thought it was not possible to change this property at runtime?

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support