behdad / box2d

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

Rotated static edge collisions #221

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When edge or loop fixtures are attached to a static body with a non-zero 
rotation, collisions with dynamic polygons are incorrect.

What steps will reproduce the problem?
Run attached test, see the behavior of the left and middle dynamic bodies. 

The dynamic body on the right is to illustrate a related question: are edge 
fixtures on dynamic bodies supported? It would seem to me that if a dynamic 
polygon can happily collide with a static edge, then a dynamic edge should be 
able to collide with other polygon fixtures, but this has the same incorrect 
results. Since it works ok while the dynamic edge's body has a zero rotation, 
my guess is that fixing the above issue would allow fix this.

Original issue reported on code.google.com by chriszca...@gmail.com on 18 Jul 2011 at 9:09

Attachments:

GoogleCodeExporter commented 9 years ago
Command: Commit  
Modified: D:\Development\Box2D\Box2D\Box2D\Collision\b2CollideEdge.cpp  
Modified: D:\Development\Box2D\Box2D\Box2D\Common\b2Math.h  
Modified: D:\Development\Box2D\Box2D\Box2D\Dynamics\b2ContactManager.cpp  
Modified: D:\Development\Box2D\Box2D\Testbed\CMakeLists.txt  
Adding: D:\Development\Box2D\Box2D\Testbed\Tests\AddPair.h  
Modified: D:\Development\Box2D\Box2D\Testbed\Tests\CharacterCollision.h  
Modified: D:\Development\Box2D\Box2D\Testbed\Tests\TestEntries.cpp  
Sending content: D:\Development\Box2D\Box2D\Box2D\Dynamics\b2ContactManager.cpp 

Sending content: D:\Development\Box2D\Box2D\Testbed\Tests\AddPair.h  
Sending content: D:\Development\Box2D\Box2D\Testbed\Tests\TestEntries.cpp  
Sending content: D:\Development\Box2D\Box2D\Testbed\CMakeLists.txt  
Sending content: D:\Development\Box2D\Box2D\Box2D\Common\b2Math.h  
Sending content: D:\Development\Box2D\Box2D\Testbed\Tests\CharacterCollision.h  
Sending content: D:\Development\Box2D\Box2D\Box2D\Collision\b2CollideEdge.cpp  
Completed: At revision: 201  

Original comment by erinca...@gmail.com on 23 Aug 2011 at 3:45