Refeuh
Thank you very much! I appreciate that
— great art work, btw, I checked the links in your signature, very nice !
Unrolling the x & y you end up with :
dir.x = Player.ImagePoint.X - Gun.Pos.X
dir.y = Player.ImagePoint.Y - Gun.Pos.Y
dirLength = sqrt(dir.x^2 + dir.y^2)
v.x = dir.x / dirLength
v.y = dir.y / dirLength
Gun.pos.x = Gun.pos.x + Gun.speed*dt*v.x
Gun.pos.y = Gun.pos.y + Gun.speed*dt*v.y
I don't fully understand this but, I think once I apply it and see it in action my visual brain will begin to grasp it.