[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
Chipmunk Physics • View topic - cpPolyShape collision issues

cpPolyShape collision issues

Official forum for the .

cpPolyShape collision issues

Postby DetectiveCakes » Wed Jul 29, 2009 6:15 pm

Has anyone else had weirdness in dealing with collisions between cpPolyShapes and other shapes?

My situation is this: I have some static cpPolyShapes hooked up to a body with infinite mass. I have some cpCirclesShapes that are user controllable. If the user pushes one of the circle shapes against a poly, initially it behaves as expected and bounces away. But if the user keeps pushing it, eventually it sort of "squeezes" through the poly shape and pops out the other side.

A few notes:
-My cpPolyShapes are convex
-The vertices of my cpPolyShapes have been defined in a clockwise direction, in order
-I'm using cpBodySlew to push stuff around. Maybe a problem?
-I don't have this problem with cpCircleShapes hitting other cpCircleShapes or cpSegmentShapes
-Seems to happen most often at/near vertices of a cpPolyShape, and in places where two cpPolyShapes touch/overlap
-I'm not dealing with particularly high velocities or particularly small shapes

Any ideas? Anyone had similar issues, even if you didn't find a solution (just so I know I'm not losing my mind)?

Thanks
DetectiveCakes
 
Posts: 5
Joined: Wed Jul 29, 2009 6:12 pm

Re: cpPolyShape collision issues

Postby slembcke » Wed Jul 29, 2009 11:12 pm

I've noticed a possibly similar issue. On the planet demo in trunk, it's possible to pull the little boxes right into the surface of the planet. You shouldn't be able to. I haven't figured out yet why this happens or how to fix it yet.

Best thing I can come up with is that the collision detection isn't returning consistent contact points when transitioning from a edge collision to a vertex collision.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: cpPolyShape collision issues

Postby DetectiveCakes » Fri Jul 31, 2009 12:12 am

Thanks for the reply!

This was cross-posted to the cocos-2d iphone forum, had a couple people report a similar issue there. I worked on a 3d physics engine too many years ago, I'll take a peak around... if I come up with anything useful I'll submit a patch (no promises though : ).
DetectiveCakes
 
Posts: 5
Joined: Wed Jul 29, 2009 6:12 pm

Re: cpPolyShape collision issues

Postby ShiftZ » Mon Aug 03, 2009 8:22 am

Just catched trouble with poly shape. I have bullets flying as poly shapes as suggested in coresponding thread. My level map bounded by 4 segment shapes (walls), and somehow bullets can only break through my walls exactly on corner of map, where segment shapes overlaps eachother. Collision massage not even generated. I have tried to increase wall thickness but with no success. I can capture it by Screen Recorder and post somewhere if need.
ShiftZ
 
Posts: 114
Joined: Sat Mar 07, 2009 7:23 am

Re: cpPolyShape collision issues

Postby DetectiveCakes » Mon Aug 03, 2009 1:25 pm

Shiftz: My silly workaround here was to create a circle shape near each vertex, which sticks outside of the poly just a little bit. It's not ideal, but it works. I'd imagine this could be used in your situation as well.

Problems with this approach:
-It's some more overhead. I didn't notice any substantial performance hit (circles seem to be quite efficient), but if you've got a lot going on could be an issue.
-Once in a while the moving body still gets through. I'd say it happens about 10% as often as it used to. Usually seems now that it gets through the intersection of the poly and circle.
-Shapes are naturally just slightly 'lumpy'.

So... that mostly works, sort of.
DetectiveCakes
 
Posts: 5
Joined: Wed Jul 29, 2009 6:12 pm

Re: cpPolyShape collision issues

Postby reklis » Fri Mar 19, 2010 9:03 am

I have been debugging and searching the forums for a week now, and I think this may be exactly what is happening with my poly shapes.

Is there another workaround besides the circle shapes suggested by @DetectiveCakes? Any new thoughts or suggestions on how to deal with this?
reklis
 
Posts: 9
Joined: Mon Mar 08, 2010 3:13 pm

Re: cpPolyShape collision issues

Postby slembcke » Fri Mar 19, 2010 10:06 am

I guess I'm not quite sure what the issue is exactly. Though it sounds likely that you want to use raycast bullets.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: cpPolyShape collision issues

Postby reklis » Fri Mar 19, 2010 12:34 pm

Is there perhaps some crafty hackery we can do with surface_v at runtime on the collision events to repel the circle from the poly so that it does not "penetrate" the perimeter?
reklis
 
Posts: 9
Joined: Mon Mar 08, 2010 3:13 pm

Re: cpPolyShape collision issues

Postby slembcke » Fri Mar 19, 2010 12:41 pm

Surface velocities only affect friction calculations. So that wouldn't help.

Are you sure the issue here isn't the lack of swept collisions?
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: cpPolyShape collision issues

Postby reklis » Sun Mar 21, 2010 1:15 pm

reklis
 
Posts: 9
Joined: Mon Mar 08, 2010 3:13 pm


Return to Chipmunk2D Physics

Who is online

Users browsing this forum: No registered users and 0 guests

cron