Hello. In my game; when player opens a chest, I want random items jump out of that chest and don’t collide. Like in Fortnite of Epic Games.
What would be the best way to do it? With a projectile movement maybe? Though I don’t know how to do that.
Thanks in advance.
I would use Add Impulse to launch them:
Then use three Random Float in Ranges to generate some vectors with x and y between like -0.25 and 0.25 with a Z of 1.0. This will shoot them up at angles near but not exactly vertical:
The Launch Multiplier is just an easy to control how high your loot launches.
Then create a new collision profile and channel so the loot only collides with the ground (WorldStatic) or whatever.
Depending on what you’re going for, Set Velocity could be used in place of Add Impulse, or you could set up a level sequence that controls their bounce more precisely. But Add Impulse sounds like the best fit from what you said above.
I’d only make them projectiles if I wanted to do something crazy with them, like have them bounce around the room or seek out specific targets.
This works. Thank you for the detailed answer!