Hi there! I’m trying to make an Asteroids on crack game but I’m having some issues with projectiles. I’m looking to have the players pawn, a sphere, able to move around the map(left, right, up, down) without being able to rotate the pawn. There is no mouse input for movement control, only the arrow keys. To fire the pawns gun, the player will use the LMB with the cursor sitting in the direction of where you want to fire. Currently, it works fine as long as the pawn stays within the center of the map, the projectile shoots in whichever direction the mouse cursor is pointing. However, once I move away from the center, the cursor position becomes ineffective and the pawn only shoots in whichever direction I moved in. Here’s my code for this:
I’m using the forward vector to get the angle at which the cursor is clicking to use as a rotation for the projectile, I think that’s where it’s messing up since forward vector is only X, but I don’t know what to do instead of that to get my desired effect, any help would be appreciated!