How to add other objects Roaming Ralph can bump into

Hi Panda users,

I’m trying to create a pac-man kind of game where the main character has to pick up items placed on the world.

I’ve used Roaming-Ralph sample as a starting point. My question would be:

How can I place items at random positions over this world?

Once this is done. How I make Ralph character know that he has just bump into one of these items?

Thanks for your help,


random placement can be done by using pythons random() function and the nodepath.setPos()
collision detection with an event handler would be the other thing you’r looking for