How can I save webcam snapshot into file / or several snapshot into several sprites ?

0 favourites
  • 3 posts
From the Asset Store
Background Story generation templates. See the Arcade demo.
  • Hi,

    for a party game that I'm developing, I want to have 4 playable characters and for each, I want to make a snapshot via webcam of each player.

    The problem I've found with the webcam snapshot is that I have to refer to UserMedia.SnapshotURL

    So if I load the first Sprite with this Snapshot URL, when I will do the same for the second Sprite (do a new snapshot), the first sprite is now also pointing to the new Snapshot URL (I don't know if I'm clear)

    So, is there a way to save the first sprite or any other way with a plugin ?

    Thanks in advance !

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Vinzc

    you are probably loading the images into different instances of the same sprite object. All instances are just copies of the same original sprite, so they will all look the same - and show the last image loaded.

    you will need 4 different sprite objects. You can put them in a family, so the same code can be used - but each image has to go to a unique object.

  • Thanks AllanR,

    My example is like this:

    UserMedia -> take snapshot from webcam0

    Sprite1 -> Load IMG from URL(UserMedia.SnapshotURL)

    UserMedia -> take snapshot from webcam0

    Sprite2 -> Load IMG from URL(UserMedia.SnapshotURL)

    and the time I was typing this text, I figured out my issue.

    Now it's working,

    Thanks !!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)