Hi
i am trying to make an game in which when the player press a button or clicks a ball is added. like when the game starts the user will click or press space bar and ball should be added to the boat, like on top and it will fall in the boat and the player can add as many ball as he or she like, but what i tried to do was make the ball visible and when the player press space bar it makes the ball visible but that don’t work either
this is fairly straightforward…
using your boat and ball as an example:
SpawnPointBP - set up your own actor BP, using a blank/dummy scene component… maybe call it SpawnPointBP. In the event graph, use the Spawn Actors of Class to spawn MyBallBP actors… you can run this off Tick, using a looped delay to slow down the spawn rate… otherwise you’ll fill your boat up instantly. Or use a keypress to trigger spawning
MyBall BP - set up another actor BP, MyBallBP, with a static mesh component (a ball) and collision component (a ball shaped collider)… set up its physics so it collides with the world and bounces around appropriately
Finally, drop SpawnPointBP into the scene at the location where you’d like your objects to drop from.
yeah like that
hey see when i put spawn actors of class to spawn spawn pointbp what should i put in for spawn transform
this is where you specify the world location (and optionally, transform and scale)… Use Get Actor Location location to get your spawn point’s own world location
or use Get Actor Transform…
this is what i have in spawnpointBP, and when in MyBallBP i made static mesh and in that i made an sphere but this still doesn’t work
Actors do not receive input by default. You may need to enable it for the player in that blueprint’s Class Defaults.