I'm making a top-down shooter with Rexu's LOS code running for the enemies and the player, so a crosshairs object disappears if the player can't actually 'see' what they're aiming at.
I thought it was working perfectly until I linked the player angle to the crosshairs (so that if the angle of the crosshairs is +- 45 degrees from the current angle, the player turns to face the crosshairs), what seems to happen is when the line-of-sight code runs, the position of the crosshairs goes completely random at every tick and as a result whenever you get close to a wall or aim behind it you end up spinning around randomly as well.
What's supposed to happen is, the opacity of the crosshairs just turns off or on depending on whether they have line of sight.
I don't even know what to try here because I can't even figure out what would be causing it.
http://http://dl.dropbox.com/u/349494/c2project0/index.html