Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
i would like to make my bullets when fired allways go in the direction of the ennemy, how can i achive that?
Develop games in your browser. Powerful, performant & highly capable.
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.
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