Hi!
I was just wondering: is there a particular reason, why the collide code is linked with an AND?
In my opinion, this results in cross-referencing when creating objects, as they only collide if they both have adequate settings.
Since I am planning to create a sort of real time editor (with Flash), I'd also want to let the user create categories on the fly - which would really be a pain for the user to keep these up to date I guess.
If I simply change the AND to an OR, like so:
everything gets much easier, and results in less work. Also, I think it's a bit more the behavior of what the user might expect (if one object says collide, it ought to be enough).
I'd now be interested: what is your / are your opinions about this? Is there any chance to get this change into the main branch or should I just create my own contact filter? Last is no problem of course, I'm just curious what the background of the decision to implement it that way was 🙂
(if it just happened that way, it's ok too 😉 )
Thanks!
Christian
I was just wondering: is there a particular reason, why the collide code is linked with an AND?
Code:
bool collide = (filter1.maskBits & filter2.categoryBits) != 0 && (filter1.categoryBits & filter2.maskBits) != 0;
In my opinion, this results in cross-referencing when creating objects, as they only collide if they both have adequate settings.
Since I am planning to create a sort of real time editor (with Flash), I'd also want to let the user create categories on the fly - which would really be a pain for the user to keep these up to date I guess.
If I simply change the AND to an OR, like so:
Code:
bool collide = (filter1.maskBits & filter2.categoryBits) != 0 || (filter1.categoryBits & filter2.maskBits) != 0;
everything gets much easier, and results in less work. Also, I think it's a bit more the behavior of what the user might expect (if one object says collide, it ought to be enough).
I'd now be interested: what is your / are your opinions about this? Is there any chance to get this change into the main branch or should I just create my own contact filter? Last is no problem of course, I'm just curious what the background of the decision to implement it that way was 🙂
(if it just happened that way, it's ok too 😉 )
Thanks!
Christian