I am working in unity with c#. I am working on a 2D platformer for mobile. The way I currently have it setup is one joystick that moves the charatcer makes the charatcer arm rotate and make the charatcer shoot the gun when pressed. Which all workd fine. But the problem I am having is the bullets from the gun are not going in the correct direction. Currently the bullets go to the rigtht no matter where I point the gun. I have tried in the raycats to use transform.right and transform.forward. All end up with the same result. the firepoint for the gun is an empty game object and the firepoint in the script is an tranfrom. I tried changing it to an GameObject in the script but I got the same results. If someone could please help it would be grealty appreciated!!!
Here is the shoot function with the raycast.