First of all, hello. When my character moves, I want the bullets to go out of proportion. How can I do this?
Hey @Kivigamedev!
Assuming you’re using the Projectile Movement component to fire your bullets, here’s how to add a random deviation to them when the player character is moving:
First, create a custom even and name it “Shoot” or whatever. With that custom event, we’re gonna spawn our projectiles which I think you already figured out how. But we’re gonna change it a little to achieve our goal. The spawn location of the projectiles should stay the same, we’re just spawning them a little furher away from the player character on the direction of the control rotation, though you might be doing it differently. Now what’s gonna be different is that we’re gonna bind the spawn rotation to a new rotator type variable. Here’s how the whole thing should look like:
Once that’s done, place this blueprint code after your input for shooting:
(In my case I trigger it with a debug key)
And here’s the result:
Hope this helps!