[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 - How do i make collision tests
Page 1 of 1

How do i make collision tests

PostPosted: Sat Nov 10, 2007 9:01 pm
by Prio

Re: How do i make collision tests

PostPosted: Tue Nov 13, 2007 6:45 am
by joshcryer
It seems you can use cpCollideShapes but I am unsure as to this as it would be an undocumented feature. Check Collision.c and see what happens? :) There's a bit of voodoo working there that I don't quite understand so I'm not sure.

Re: How do i make collision tests

PostPosted: Tue Nov 13, 2007 1:22 pm
by slembcke
What you really want is ray tracing. An oft requested feature. I have plans for using it myself at some point in the future for line of sight, lasers, etc. I'll get around to it sometime, I just can't promise when.

The problem with what you want to do is that you would have to check the LOS shape against everything in the space to see if the player is obscured. I probably wouldn't use Chipmunk to handle this for you at the moment. If you can get away with static line segments, store them separately in your own code and check against them there. That would be pretty easy to implement.

Re: How do i make collision tests

PostPosted: Tue Nov 13, 2007 7:14 pm
by Prio
Thanks for the help. Yeah I think I will use my own collision system for it.