YuShaN Posted November 14, 2015 Share Posted November 14, 2015 Hi everyone. I want make a line bullet move like a wave. I mean when i presst "shoot" first bullet start at x: 100 then x: 110 -> x: 120 -> x: 130 -> x: 140 -> x: 150 -> x: 140 -> x: 130 -> x: 120 -> x: 110 -> x: 100 then again. How to do it? Thank you Link to comment Share on other sites More sharing options...
YuShaN Posted November 14, 2015 Author Share Posted November 14, 2015 I've found a way to solve this problem http://phaser.io/sandbox/edit/ZXFtECvY gaelbeltran and shohan4556 2 Link to comment Share on other sites More sharing options...
jmp909 Posted November 14, 2015 Share Posted November 14, 2015 use a sine wave. here's an example (hold your mouse button down)http://phaser.io/sandbox/KpeGqAVc/play I'm not saying this is the best way to fire bullets (it isn't!), it's just an example of the maths Link to comment Share on other sites More sharing options...
jmp909 Posted November 14, 2015 Share Posted November 14, 2015 ah ok.. your question wasn't specific Link to comment Share on other sites More sharing options...
Recommended Posts