Zuick Posted September 17, 2014 Share Posted September 17, 2014 Hi,the problem is that body is not move straight if drag property set. Check asteroids example http://examples.phaser.io/_site/view_full.html?d=arcade%20physics&f=asteroids+movement.js&t=asteroids%20movementThere are some roaming at the end of ship moving. How it can be fixed? Link to comment Share on other sites More sharing options...
Zuick Posted September 23, 2014 Author Share Posted September 23, 2014 More clearly about topic, red line is how object moves, green - is how I want it to move Link to comment Share on other sites More sharing options...
wayfinder Posted September 23, 2014 Share Posted September 23, 2014 I think this might be due to drag being applied by axis and not by velocity vector. You can try to turn off drag and write a little routine yourself where you create a Phaser.Point from your current velocity and use getMagnitude/setMagnitude to scale it according to your desired drag value, and then reapply the velocity. Zuick 1 Link to comment Share on other sites More sharing options...
lewster32 Posted September 23, 2014 Share Posted September 23, 2014 Yeah I've seen similar problems with drag incorrectly being applied in Arcade physics. Link to comment Share on other sites More sharing options...
Zuick Posted September 23, 2014 Author Share Posted September 23, 2014 thanks, Wayfinder, I'll try it Link to comment Share on other sites More sharing options...
Recommended Posts