there is “spawn actor from class” inside blueprint. When you select that node, you will se 3 inputs:
- Class < This is what you want to spawn so you select your ball here
- Spawn Transform < This is rotation, scale and location of object you want to spawn. So you can input node “Make transform” and put random nodes to “Make transform”.
- Spawn even if colliding < self explainatory, but in case you didn’t understand it, if checked it will create a ball on top of player or other object, unselecting will only spawn balls on location where are no other objects.
The output:
Return value < This is your actor, you set variable here, so that you can destroy actor when it enters the net.
Image below: