How do I make collectable objects stick to the player object?

Greetings!

Like the title says. I am looking for an effect similar to the game Katamari where you controlled a ball and used it to pick up objects that stuck to the surface of the ball. Any help is greatly appreciated.

That’s not too hard. When you detect the object has touched the player object, just move it into the player object in the scene hierarchy, by calling theObj.transform.SetParent(playerObj.transform, true).

Now it’s a child of the player object, so however the player object moves, the stuck-on thing does too.

Perfect! Thank you kindly. :slight_smile:

1 Like