how do i delete 1 of multiple instances

Godot Version



I have multiple grass instances and i want to have when the player clicks on them it changes the item_held value and removes the grass

Give us some more information, man :smiley:

  • What’s your current code? What have you tried?
  • What’s your node tree structure?
  • 2D/3D?
1 Like

Object picking, is an option for area3d and rigidbody3d. This can be understood by reading the input event doc section 8.

Each instance of grass would have a collision body that would detect this “hand” grab and either delete it or remove it as a child to the held_item value.

The alternative is to cast your own ray from the camera, or hand, to see if it hit the collision body of the grass.