Wheel as player foot - platforms

General discussion about Box2D tutorials
Post Reply
Posts: 13
Joined: Wed May 27, 2015 1:59 pm

Wheel as player foot - platforms

Post 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.
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Wheel as player foot - platforms

Post 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.
Post Reply