2.5D Side Scroller Gun Aim

We have tried multiple solutions on our own and none seem to quite work. So I’ll explain our situation. We have all 3D models and our main character has a rig. We want the shoulder or elbow joints to follow the mouse position so that the gun is always looking at the mouse.

Are there any suggestions and or pointing us in the right direction that could be helpful?

It would be greatly appreciated.

The code we currently have is really confusing and we have to use “angle fixes” and essentially randomly find the correct values which just isn’t working. We think there has to be an easier way, we are just unaware of possible functions within Unity to ease the process.

Add a mouse look script to your characters gun. You need to make sure it pivots on the side of your character’s gun so you’ll need to make a gameobject and place that on the side of your gun facing your character put that in the character and attach the gun to that and the mouse look to the empty gameobject. On the mouse look script Chang it to just mouse y at the top and that should work (Works for me).