hi
i would like to make my bullets when fired allways go in the direction of the ennemy, how can i achive that?
Try this:
Every tick -> BulletSprite set Angle to anglelerp(Self.Angle, angle(Self.X, Self.Y, Target.X, Target.Y), dt*4)
In Bullet behavior set "Set angle=Yes"
i changed the dt*4) to dt*40) because before that the bullet was turning all around the moving ennemy who has "sine movement"
also i dont know why but my vertical line "laser" has a wrong angle like turning to 45° or something
Well, if you want the bullet to immediately change angle, you can remove the alnglelerp part.
Simply set angle to angle(Self.X, Self.Y, Target.X, Target.Y)
anglelerp was to make the trajectory smoother.
Develop games in your browser. Powerful, performant & highly capable.
well i keep the same problem :s
normally those pink lines are suposed to be allways vertical the bullets are following the pink circle but angle of laser is wrong
SOLVED it was a sprite problem i rotated my sprite
thanks dop2000