Download

Spawned collectables after killed enemy not affected by gravity

I’m trying to make a simple mechanic where when the player kills an enemy, it will drop an item that the player can walk up to, press a button, and add it to their inventory. My only problem is when I am spawning the actors (collectibles), they stay at the center of the destroyed sprite and won’t fall to the floor. I’m still pretty new at this and I think I need to add some sort of force to the actor after it’s been spawned, but haven’t had much luck with it. Any help would be appreciated.

Make sure the spawned item class has physics enabled and has mass. I think you can also modify these properties after the spawn. Make sure they are also colliding with some objects in an undesired way when they spawn which may cause them to be held in place.