Lotti Posted March 31, 2014 Share Posted March 31, 2014 Hi! is it true that in arcade physics once i set the acceleration or the velocity, it never decrease? there is some friction to set to make it decrease by itself or i must control it by myself? Link to comment Share on other sites More sharing options...
rich Posted March 31, 2014 Share Posted March 31, 2014 See body.drag jdnichollsc 1 Link to comment Share on other sites More sharing options...
Lotti Posted March 31, 2014 Author Share Posted March 31, 2014 how to use it? is it the amount of velocity loss per second? i applied a drag of 0.2, 0.2 and 1.0, 1.0 with no differences :\http://docs.phaser.io/Phaser.Physics.Arcade.Body.html#drag(can't find any use of drag var inside this file too http://docs.phaser.io/Body.js.html) Link to comment Share on other sites More sharing options...
rich Posted April 1, 2014 Share Posted April 1, 2014 It's a point object, so you'd specify Sprite.body.drag.x = 5 (or whatever speed you want to decrease by). It's applied in World.updateMotion. jdnichollsc, jackrugile and askariwa 3 Link to comment Share on other sites More sharing options...
Recommended Posts