-
-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collision category bits #344
Comments
found it, |
What did you find exactly? Did you find an issue in your code or in the library? |
Well, I think it was an issue with trying to use higher 0x00 numbers. Enum (I believe) defaults to an Unsigned 32 bit number, and I see that RP3D expects Unsigned short, although I thought that the cast would work. Anyway, I just declare my collision categories like this and it worked: static const U16 TEAM_0_ACTOR_COLLISION_CATEGORY = 256; |
I'm guessing this feature isn't well tested because it's not often used. But this collision filtering seems totally broken in my application. I can't prevent collisions between spheres/boxes and triangle meshes, even if I set It does work if you set the bits to 0 on the first frame, but if you wait and set it later, it doesn't work. Is this the intended behavior? |
The issue with |
Thanks @ScottFreeCode for the explanation. I think I can now close this issue. Do not hesitate to reopen it if necessary. |
Here's the docs:
enum Category {
CATEGORY1 = 0x0001,
CATEGORY2 = 0x0002,
CATEGORY3 = 0x0004
};
When I start extending this, such as:
enum Category {
CATEGORY1 = 0x0001,
CATEGORY2 = 0x0002,
CATEGORY3 = 0x0004
CATEGORY4 = 0x0008
CATEGORY5 = 0x0016
CATEGORY6 = 0x0032
CATEGORY7 = 0x0064
};
I find that say CATEGORY4 | CATEGORY7 also tests true with CATEGORY2 - what am I doing wrong?
The text was updated successfully, but these errors were encountered: