Cannons shooting in random angles

Hi everyone!

I am a big fan of the old ps1 game Crash Bash and thought of trying to recreate the minigame “Ballistix” which were like a 4-man ping pong game.

Anywho, I almost got it all working, I “Only” need to make some AI to play with, or even look into making it multiplayer, for fun.

But right now, in every corner, there’s a cannon that shoots balls into the arena. I want them to be able to shoot off the balls at random angles like -10 to +10 degrees to its normal angles, so they never shoot balls in the same direction every time.

I thought about changing the balls actor blueprints Projectile components velocity, but I am not sure if its the right way to go, since all the blueprint logic is in the cannon actor.
Though, I dont want the cannon mesh to visually rotate to the direction it shoots. Just make the ball shoot in random directions, like it had bad accuracy.

Any of you got an idea as to how I could go about this?
I also haven’t quite figured out how to make the balls shoot out at random times, right now they just shoot out every 2 seconds. Would love an interval between 5-10 seconds randomly split between the 4 cannons.

Anyway, heres some pictures of the arena and cannon blueprint.

Alright, got the random shooting to work perfectly, it was stupidly simple after some head scratching :slight_smile:

Im still struggling with the event begin play thing.

Hah! I figured it out!
Didn’t realize I could randomize the delay in a tick event, to make it call out the shoot it event at random times!
Totally did the trick!
Thanks me!

heres a picture to show it