Hi,
probably me but Ive got a strange little problem I cant seem to solve.
Ive got a gun like a tank which fires a bullet in the direction of the touch on the screen.
I am using the angleBetween function which I found on this site. Now If I set the object.rotation to the result of anglebetween its spot on. However to fire my bullet I use an applyForce(angleBetween, yspeed, bullet.x, bullet.y) but it doesn’t track acurately.
For example if the tank is facing west (not sure if thats zero degrees) the bullets are flying out at about 30 degrees. As I move around towards 90 degrees (tank facing north) the accuracy improves but then starts to drop off again as I move towards 180 degrees. Again with the tank facing west now the bullets are firing at about 150 degrees. I’m not sure why???
TIA
Gary [import]uid: 7334 topic_id: 6361 reply_id: 306361[/import]