I have been reading quite a lot of articles about this subject, but I still have problems. I am sure this is because I suck at coding but I am here to learn.
My main dude has a 360 degree movement, now I want him to be able to shoot (or actually toss hammers). For this I use:
Press fire 2 -> Set posX of "Hammer" to Cos(rotY("player" ))*4
Set posY of "Hammer" to Sin(rotY("player" ))*4
posX and posY are values
rotY is the rotation value of the player
Always -> Set X of "Hammer" to X( "Hammer" )+posX( "Hammer" )
Set Y of "Hammer" to Y( "Hammer" )(posY( "Hammer" )
But this doesn't seem accurate, sometimes it's right, sometimes its a little off, which makes it hard to aim. What am I doing wrong?