Page 1 of 1

Constraints and Static Bodies

Posted: Thu Nov 11, 2010 6:54 pm
by gerrit
I'm not clear if you can use NULL as a body when you create constraints, but I've found a number of places where constraints (cpPinJoint and cpRotaryLimitJoint were what I was working with) are accessing properties on the bodies without checking if they're null.

I couldn't find anything in the documentation about whether using a NULL body is supported, but I found a bunch of places where constraints *do* check if a body is null... which makes me think that it's a feature that's supposed to be.

If you'd like more info on what I found, just let me know!

As always, thanks for Chipmunk.

Re: Constraints and Static Bodies

Posted: Thu Nov 11, 2010 9:37 pm
by slembcke
Substituting NULL to mean the space's static body was a something I was going to do, but found a bunch of issues. I didn't take the NULL checks out yet, but I haven't really said that it's officially supported or documented it as a feature.

Basically it's stuck in a mostly-but-not-quite working limbo right now.