Search the Community
Showing results for tags 'topview'.
Found 1 result
So, i'm trying to make a top-view car game prototype using the P2 physics engine and i've faced some weird bug? with the RevoluteConstraints. The idea is simple: create a car body sprite, create two tires and attach them to the car body, then apply car physics simulation on those tires and let the body follow. And the problem is that when tires are joint to the car, they are positioned wrong (which is weird) + the car starts rotating and the reason for that i just can't understand as: tires are positioned symmetrically + both RevoluteConstraints have the same forces that should be applied to constrain the bodies. May be i'm getting something wrong? I wouldn't make this topic if there were more advanced examples covering the P2 physics or at least examples in the docs/source code (yep, i've already googled for a solution). Here's a picture And here's the code (also available here http://pastebin.com/qjqeF5bc):