Sprite Angle in Ai Behaviors mod

BlitzMax Forums/BlitzMax Beginners Area/Sprite Angle in Ai Behaviors mod

JohnK(Posted 2007) [#1]
Hi All! I have one problem with Sprite Ai Behaviors mod. I creating one Sprite, after, in main cycle, i wan't, that this sprite create a bullet. I wrote function, and when i wan't use it, i set angle=Enemy.GetHeading() - but bullet creating with not the angle of sprite.Who know, why?

Sorry for my POOREST english.


H&K(Posted 2007) [#2]
Is it always the wrong heading by the same amount?

That is if you want a heading of "up" and the bullet is heading "left", and then when you want a heading of "Right" the bullet is heading "up".

Is so then there is simply a transform addition/subtraction missing from the angle. Add a constant to the bullet heading. (Try 90 degrees or pi/2)


JohnK(Posted 2007) [#3]
H&K, thanks.Hmm....Strange...If i will write angle=-Enemy.GetHeading(), then all seems to be right.


Sorry for my POOREST english.