Trash Can Like Behavior

Is there a way or a behavior that helps me simulate a trash can? Like when I drag an object to the trash can it would fall into it and the object would be hidden.

If you do not want any falling animation then,
the simplest way:

  • add a condition to check if the object that you want to delete is in collision with the trash can object.
  • if it is simply delete or hide the object.
1 Like

Thank you for that one~ what should I do if I want the falling animation?

Now I’m studying I’ll reply later.

No problem. Thank you so much :slight_smile:

I suppose you could rotate the object and reduce its size to 0 when the mouse click is released AND the object is in collision with the trash can… depending on what kind of animation you’re looking for.

Here you go…
events:


world setup

When you put an object near the trashcan, range 200px (you can change) the trash will move towards the trashcan and boom disappear.

THANK YOU SO MUCH for the help~