Hello there,
As you all may know, the chipmunk doesn't detect all the time the collisions. In my case, i have bodys with great velocity. And what happens sometimes is that a non-static body passes through a static body.
How can i solve this? Is there a right way to do it? Or do i need to change game physics because of that?
Regards,
ichigo.
How to enable permanent collision detection?
-
- Posts: 13
- Joined: Wed May 02, 2012 7:23 am
- Contact:
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: How to enable permanent collision detection?
What you are looking for is often called swept collisions, continuous collision detection or just CCD. Chipmunk doesn't support that currently, and it's not terribly high on my todo list as most games don't really seem to need CCD.
If your fast moving objects are small, such as bullets you can use raycasts instead of objects. Box2D supports CCD if it's a must have feature.
If your fast moving objects are small, such as bullets you can use raycasts instead of objects. Box2D supports CCD if it's a must have feature.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 13
- Joined: Wed May 02, 2012 7:23 am
- Contact:
Re: How to enable permanent collision detection?
Unfortunatelly my objects are bigger than bullets. Anyway, i will see what i can do.
Thanks for you answer.
Thanks for you answer.
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: How to enable permanent collision detection?
Your other option is to use smaller time steps, although it uses more CPU time.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 13
- Joined: Wed May 02, 2012 7:23 am
- Contact:
Re: How to enable permanent collision detection?
Well, if i do that, the update loop would be wrong. I would not see the bodys update at the right time, i believe.
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: How to enable permanent collision detection?
Actually I would recommend keeping your updates and rendering separate anyway. This is a pretty good article on how to do that:
http://gafferongames.com/game-physics/f ... -timestep/
http://gafferongames.com/game-physics/f ... -timestep/
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 13
- Joined: Wed May 02, 2012 7:23 am
- Contact:
Re: How to enable permanent collision detection?
Thank you! =)
Who is online
Users browsing this forum: No registered users and 13 guests