Forums > MaxMSP

Make sprite disappear when not receiving input

May 16, 2013 | 7:14 am

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

May 16, 2013 | 8:19 pm

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.


May 22, 2013 | 6:14 am

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

<code>

– Pasted Max Patch, click to expand. –

</code>


Viewing 3 posts - 1 through 3 (of 3 total)