jjvelmar Posted July 22, 2015 Share Posted July 22, 2015 I just bought the Box2d Premium Plugin and am happy with it. I definitely has some good examples including Top Down Car, which will make my life easier to getting my project going. I was wondering if anyone had a more advanced Top Down Car model that accounts for the wheels turning and making things more realistic? I found a great example already using Box2d online at...http://www.emanueleferonato.com/2009/04/06/two-ways-to-make-box2d-cars/ ...but it does not use Phaser, just Box2d and something for web (?flash?). Can someone help me to make sense of the non-Phaser Box2d code and how to "convert it" or provide some example of how to make a top down car game with Phaser and Box2d that is more advanced than the one that comes with the Premium examples. I think it has to do with making the car body, 4 wheels, joint, and Killing the Orthogonal velocity (applies a "friction" in a direction orthogonal to the body's axis) Link to comment Share on other sites More sharing options...
Matthew Cooley Posted July 23, 2015 Share Posted July 23, 2015 I just did a small top down car project. I'm not able to walk you through the whole process, but I can tell you where I ended up starting. This person took Feronato's Flash example and adapted it to box2d's stand alone javascript port: https://github.com/domasx2/gamejs-box2d-car-example It was a little bit of work adapting this demo, which uses the standalone box2d js library, to use the Phaser version. The differences between the Phaser and the standalone versions are not huge, but there was some trial and error. For example, I believe the y axis is inverted in Phaser relative to the stand alone version. Also, if I recall correctly in the stand alone version the methods for controlling/getting data from a body are all on the 'body' object, whereas in the Phaser version some of those methods are moved to a body.data object. Link to comment Share on other sites More sharing options...
ShimShamSam Posted February 24, 2016 Share Posted February 24, 2016 This is way late to the party, but I took what I saw and adapted it to work with Phaser. As far as I can tell, this should work with any of Phaser's physics engines. Here's the Gist Link to comment Share on other sites More sharing options...
Recommended Posts