What kind of node to use for object group that can be moved, cropped and has collision?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Fret

Hi,
beginner here, learning the basics.
I want to have (2D) things made out of separate objects. if the thing is clicked on, it should move towards a “portal” and get cropped as soon it touches it, so it looks like its entering the portal and disappears. each of the separate objects needs to have collision, the goal is to make all objects disappear into portals without touching each other.

so I need something made of several parts, that I can move and “crop”, where each part has collision. can someone point me in the right direction on what nodes to use to build that?

enter image description here

:bust_in_silhouette: Reply From: exuin

I think you need a bunch of nodes here:

  • A kinematicbody2d to have collision detection
  • Multiple CollisionShape2Ds for each of the separate parts of the object
  • Area2Ds to detect clicks
  • Sprites to show the objects to the player
  • Something like a shader or an animationplayer to play a disappearing animation

Agreed. This is the beauty of Godot at it’s best.
If you need multiple functionality then use multiple nodes

Wakatta | 2021-06-17 23:32

Thank you!

I made some progress, but I can’t figure out how to make the “disappearing” work. For Animationplayer, I would need some kind of property I could use to crop the sprite/collisionshape2d/area2d but I can’t find any I could use.

Any tips on that?

Fret | 2021-06-18 17:18