Okay, so I'm currently creating a top-down shooter with weapon switching, I've come across a problem.

First up, this is the layout of my player:

This is what I came up with, sprite is rotated to "look_at" the mouse position, then the gun is a child of the mouse so it's rotation is changed too.

Now I want to fire a bullet from a gun, so I came up with this:

Basically I want to find a point on a circle.

So I used the following equations:

```
x = centreX + radius * cos(rotation)
y = centreY + radius * sin(rotation)
```

In this line of code:

```
var posOnCircle = Vector2(pos.x + radius * cos(rotation), pos.y + radius * sin(rotation))
```

pos - centre of player

radius - pre-defined radius

rotation - rotation in radians

And this doesn't work for me. Maybe I'm overcomplicating things, I'd be satisfied with a better solution to the problem rather than just a fix, but this is what I came up with.