Forums

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

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

Christian
V-Play Team

Hi Chrisu,

good hear from you again – always challenging to answer your questions :)

This is a tricky question, because of the following:

The SingleSpriteFromFile uses batched rendering for maximum performance, which means all sprites within the sprite sheet are drawn in one draw call. This SpriteBatchContainer is usually put at the root element of your GameWindow. This means when drawing the items based after their z order, the sprites of the spritesheet are drawn first, and afterwards the particles are drawn. To avoid the Particle being drawn on top of the sprites but below them, you would need to put the Particle element before the SpriteBatchContainer and modify its property there. You could also play with the vertexZ property and try to get it right.

Please let me know if this approach works for you.

Cheers, Chris

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