Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Windshield wiper effect
Forum Updated to NodeBB v4.3 + New Features

Windshield wiper effect

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
animationcollisions
1 Posts 1 Posters 369 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Richard Eigenmann
    wrote on last edited by
    #1

    I want to draw random raindrops over an Image and then have a windshield wiper erase them as it moves over the image.

    One approach is to use a ParticleSystem to emit the raindrops as ImageParticle(s) or ItemParticle(s) with a delegate Component of Image. I can use a Rectangle with a rotation and suitable transformOrigin and a rotation to simulate the windshield wiper. But how do I get the rectangle to do a collision detection with the raindrops during the animation and use the collision to hide or z order the raindrop away? (wiper.contains(mapToItem(wiper, x, y)) would allow each particle to figure out if it is under the wiper rectangle)

    Is there some sort of event handler that fires for each step of the wiper animation?

    Or is this a use case for doing the animation and emitting in C++ instead of QML?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved