Make sprite disappear when not receiving input

May 16, 2013 at 7:14am

Make sprite disappear when not receiving input

In the patch I’ve attached, a sprite is drawn on the screen.
When you’re hold down the left mouse button, you’re able to move the sprite with the mouse.
What I want to happen is for the sprite to disappear when you’re not pressing the left mouse button.

In the real patch I have a Kinect that is streaming in data.
When people are detected I want them drawn on a map.
When they’re not being detected, I want their sprite to disappear.
I’ve also seen the situation where when someone walks off screen, their skeleton is still sending data, but it’s just the same data over and over again.
I figure I want the opposite of change in that case, but the situation should be the same, I need a way to trigger the sprite getting hidden or moved off the screen.

<code>

– Pasted Max Patch, click to expand. –

</code>

Attachments:
  1. movesprite.maxpat
#249532
May 16, 2013 at 8:19pm

Eventually I just made it move off the screen ever 2 seconds with a metro. If it’s still active the data coming from the sensor will immediately move it back, so it flickers, but this is good enough for what I’m doing.

#249619
May 22, 2013 at 6:14am

Use the ‘enable’ message to the 3D object.

<code>

– Pasted Max Patch, click to expand. –

</code>

#250242

You must be logged in to reply to this topic.