Page 1 of 1

Wheel as player foot - platforms

Posted: Thu Aug 27, 2015 12:00 pm
by UKDeveloper99
Hi Chris,

you might remember that I was implementing your rocket platforms a while back. Well they work really nicely, unfortunately I have a problem, the foot of my character is a wheel and it has very high friction to prevent sliding.

When I move the character on the platform, the wheel moves the platform in the other direction. The only way to counteract this physically is to set the force of the rocket platforms really powerful so they stick to the target position a lot more.

I know there is some way you can prevent one body from having an effect on an another, in the contact solver or something. Is there a way I can move on the platform, so the wheel rotates along the platform body, without effecting the linear or angular velocity of the rocket platform?

Any ideas would be great.

Re: Wheel as player foot - platforms

Posted: Thu Aug 27, 2015 6:12 pm
by iforce2d
Usually the best way to start tackling issues like this is to think about how it is in the real world, because box2d is trying its best to simulate the real world. Most likely your platform and your player are not so vastly different in size, and if you have not adjusted the densities of their fixtures then their mass will be fairly similar too. The simplest way is to make the mass of the platform much larger than the player.