Sensors in Box2D

BlitzMax Forums/Brucey's Modules/Sensors in Box2D

Rico(Posted 2008) [#1]
Hi - I can get the shapeDef.SetIsSensor(true) method to work. Although it is in the main body of the help document - it isn't at the bottom with the list of all types and methods. There is an IsSensor method to check if a shape is a sensor, but not a method to set up a sensor. (unless my help doc is out of date now?)
Could someone tell me how to set a shape as a sensor? Thank you.


Brucey(Posted 2008) [#2]
It was added in a recent SVN update. You might need to rebuild the documentation in order to see it in the Methods list at the bottom.

The shape def has a getter (IsSensor) and a setter (SetIsSensor), the shape itself only a getter (IsSensor).


Rico(Posted 2008) [#3]
Yes I've heard lots of people mention SVN. Would you mind explaining to me what the difference between SVN module and the normal ones I download? (I'm fairly green). I know how to compile the standard modules (I have Box2D and Chipmunk release versions - Thank you very much!) is the process the same with SVN? Where do I get the SVN modules from?
I have only started using the PC to program this year, so I am quitre ignorant about a lot of things, and I need somone to enlighten me a bit. Thanks mate.
I do need to use Sensors, so I really need to use the SVN module.

Thank you very much.


Armitage 1982(Posted 2008) [#4]
The Brucey SVN URL is available here : http://code.google.com/p/maxmods/source/checkout

The Brucey Box2d Module SVN is available here : http://maxmods.googlecode.com/svn/trunk/box2d.mod/

Finally TortoiseSVN is available here : http://tortoisesvn.tigris.org/

And I think you can find a good tutorial on how to use it here : http://www.mind.ilstu.edu/research/robots/iris4/developers/svntutorial/

Personally I just install TortoiseSVN, allow contextual integration in Windows XP, create a new folder (for example inside: mod\bah.mod\box2d.mod) left clic on it and chose SVN Checkout then past the SVN URL (http://maxmods.googlecode.com/svn/trunk/box2d.mod/) into the URL of repository input textbox.

It's all you have to do to get the last sub version Brucey working on.
Don't forget to compile on every new SVN Update you will make.

There is plenty advantages of using SVN.
You will probably find that by yourself ;)

Hope this help Rico


Brucey(Posted 2008) [#5]
Rico, I've released a new version, which is available for download if you don't want to do the SVN thing ;-)


Rico(Posted 2008) [#6]
Thank you very much Brucey! I was just about to attempt to do SVN. I have downloaded TortoiseSVN - so I will give it a go soon anyway. Thank you very much Armitage for all your help :) - I very much appreciate it.
Brucey - good timing! I spent the afternoon making a canon in Box2d, but I really need sensors for my game proper.

Thank you both!