-
Notifications
You must be signed in to change notification settings - Fork 404
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
Add setCollisionMask
and getCollisionMask
to Shape's API
#2090
base: main
Are you sure you want to change the base?
Conversation
@@ -161,8 +161,10 @@ class Shape : public love::physics::Shape | |||
|
|||
int setCategory(lua_State *L); | |||
int setMask(lua_State *L); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unclear to me if we want to maintain this API, or prefer to deprecate.
test:assertEquals(nil, shape2:getMask(), 'check no mask') | ||
shape2:setMask(1, 2, 3) | ||
test:assertEquals(3, #{shape2:getMask()}, 'check set mask') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverting after reading:
https://github.com/love2d/love/tree/main/testing#l%C3%B6vetest
@slime73, is there anything else I should do to get this across the line? |
I'm wondering about usability - if someone wants an object to collide with everything or nearly everything, they'd need to specify around 16 parameters with the new API whereas with the old one it'd be much less. |
Previous behavior still works if I'm correct so you can still use it. The real question to me is will we keep the two implementations ? I would prefer to have functions:
|
Implements the suggestion in: #2072