Check collision on wall

I 'm doing a adventure game.
For moving, i did so:

Code:
-(void) tick: (ccTime) dt{
mainCharBody->SetLinearVelocity(b2Vec2(MovementX, mainCharBody->GetLinearVelocity().y));
....
}


When i jumped and touched a wall, kept press right/ left arrow button, my character stand on wall as the result of colission solved by Box2d.
Keep press arrow button, my character continue standing on wall.
Release arrow button -> velocity.x = 0, my character fall down.

I also can't set velocity.x = 0 when touching wall. I will can't control my character go back when going on ground and touch a wall.

Anybody helps me? My character 's sharps as a capsule.
Are you making a Spiderman game? Great!
hehe... just kidding.

I think you should try using ApplyForce instead of setting the velocity. In the real world nothing starts moving instantaneously - it always moves because it is acted on by a force.

Now if you call ApplyForce every timestep, you will find that your player just gets faster and faster and faster. So you need to decide on what top speed he should have, and reduce the force you apply as he gets near the top speed.
when my character fall in to hole, applyforce can't make my character climp up. My character 's movement seems not to be natural when using aplly force
This seems to be exactly the same problem I had. I've posted my solution here: viewtopic.php?f=3&t=5813 It should work perfectly for your problem (the only problem I'm having now is that my body is able to rotate which makes the calculation more complicated).
Can u show me your "contact point" class plz. How can u call contact point->getangle ?
i solved almost my problems. But still have a bit troubles.
My character foot sharpe circle.When "the foot move and touch the wall", the contact listener misunderstand that "my foot is on the ground. So that beside the wall, i can jump any height =.=.

More over, when jumping and touch wall from father place. I have high velocity x, so that the contact "foot and wall" still happend.

If I resize my foot a bit smaller, my character will have a another trouble with the corner 😕 see this
viewtopic.php?f=3&t=5436&p=25365&hilit=capsule#p25365
mwizard wrote:
i solved almost my problems.

Can you show me your code? 😉
i 'm coding with xcode. And i don't know how to post my code 🙄

Original thread: https://box2d.org/forum/viewtopic.php?t=5822