stevenxiao / box2d

Automatically exported from code.google.com/p/box2d
0 stars 0 forks source link

b2Contact -> IsTouching()=true for two non touching bodies. #267

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Body stood over the ground.
2. I apply LinearImpulse to make him jump, then world->step.
3. After this world->step I get a contact with IsTouching=true. Then render 
with DebugDraw and I see the body separated from the ground.

What is the expected output? What do you see instead?
I expect IsTouching = false.

What version of the product are you using? On what operating system?
2.2.1. Windows 7 Professional. Service Pack 1. 64bit.

Please provide any additional information below.

- Attached the file log with dump info just after impulse and world->step 
- Attached also what i see in the screen. (This is the render of world state 
when I get contact-> IsTouching=true).

Original issue reported on code.google.com by bikiniwe...@gmail.com on 10 Mar 2012 at 12:56

Attachments:

GoogleCodeExporter commented 9 years ago
In this case IsTouching applies to the beginning of the time step. Box2D 
performs collision first then simulation. So at the end of the time step the 
collision result may be invalid. If you must have the current contact situation 
you can call b2Contact::Evaluate.

Original comment by erinca...@gmail.com on 17 Mar 2012 at 5:06

GoogleCodeExporter commented 9 years ago

Original comment by erinca...@gmail.com on 17 Mar 2012 at 5:06