Hello! I just can’t seem to wrap my head around how you should rotate something locally. I’ve been trying to make it work for a few days now but I just don’t get it.

I have this weapon code here where I’m spawning the projectiles. What I’m trying to do is roll (rotate its x axis) it (the projectile) a certain amount based on how many pellets the weapon unleashes in a blast, then pitch (y axis) it up a bit so that I get a circle where the pellets can go and somewhat guarantee that the random calculations won’t make them all go in the same direction. This is for a shotgun specifically.

Thank you in advance!