-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Collision capsule support #4288
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
Conversation
Basically all the easy copy-pastes & switch cases. Add capsule to shape enums. Add most switch cases for capsules, often piggybacking on capsule/rect. Add dock tools (they use ellipse icons currently). Python/lua bindings.
|
Oh! Almost forgot. Discussion on feature: #2153 |
|
That's great, thanks for making this addition! And indeed this really involved mostly minor adjustments to many places in the code and Qt can already draw these shapes so no problem there either. I think the only remaining thing we need is a fitting icon. I'll try to create one in the style of the other ones. I've added your name in copyright line for the new files. I think the changes in other files are small enough that it makes little sense to add your name everywhere. I hope that's fine. Translations files will be updated 1-2 weeks before I make the next release. I'm also not sure what would make a good default shortcut... For the edge case, I've opted to also use it there since a 0-width/height capsule is also just a line. We can test later whether this is still an issue today. |
|
Maybe alt+C would work? There doesn't seem to be an existing expectation of what alt is meant to do and it does make a little sense with how similar ellipses and capsules are. |
|
Unfortunately we already put Alt+C on a hidden "copy hovered coordinates to clipboard" action. :-) |
Looks rather similar to the ellipse icon, but oh well.
TODO: JSON format
|
Alright, icons are in, docs are updated, NEWS is updated! I think we're ready to merge this, @5gTestSubject? |
|
@bjorn looks good from my end. Thanks for accepting this! Game devs are gonna be happy. |
|
@5gTestSubject Thanks again for this contribution! I've opted to put it on Shift+C in the end, which should be still available. |
Adds support for capsule shapes constructed similarly to rectangles and ellipses.
Lots of copy/paste work of ellipse support with a little custom work on drawing.
Object Layer
A .tmx snippet of an ellipse and a capsule:
Tile Collisions
Left: ellipse. Right: two capsules.

They happen to be in an isometric project.
A .tsx snippet of an ellipse and a capsule:
Needs Work