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
Render tile collision shapes to the main map #799
Comments
Maybe this library could help: http://www.angusj.com/delphi/clipper.php I already use it to join the tile collisions for my Unity plugin :) |
I just searched something about this feature and issue already is. Will be nice to have option to enable/disable render the collision shapes to map and also set specific color for that shapes. Is the need to view real tiles shape, because collision shape can be smaller or bigger than images tile. Precision of placing images as bodies for physics simulation becomes great! |
@T1mL3arn Yes, I fully agree this would be a useful feature. All I need is time to get around to it! @Chaoseiro This answer comes a bit late, but I consider this issue just about visualizing the collision shapes on the map. For this there is no need to join them together. Still, such functionality would be nice as an export feature, which already exists in for example Tiled2Unity. |
i same with @Chaoseiro
I use, like many others, in Tiled2Unity, and it is very convenient when a layer belongs to the collision object that you want to render. I am uncomfortable to render each object to write the object collisions, and later connecting it with the object render in Unity. |
@sawt00th I find it very hard to understand what you mean. Are you sure you're with @Chaoseiro, who brought up the usage of Clipper to merge collision shapes, or are you just in favor of the general feature of displaying the collision shapes in the map view?
Why is this not possible? Is it a limitation of Tiled2Unity? Maybe you could just have a custom property at the tile layer saying whether collision shapes should be used for the tiles on that layer? Then you can use a separate layer to place non-colliding tiles.
I'm afraid I do not understand what you're saying here. Can you try to be more verbose or reconsider your choice of words?
Here also I do not understand what you mean. |
FWIW, we use standard object layers in melonJS to define collision shapes. It makes visualization super simple. The tile collision shapes haven't been much use for us. |
That's a fine approach as well, but I think for those using Tiled2Unity, the tile collision shapes are generally quite useful. The tool automatically merges it all together into a single optimized collision mesh. |
I believe we would love to make better use of it. The UX on the tool doesn't feel as good as object layer shapes. Anyway, the rendering of those tile shapes within the map view will be a nice step toward that goal. |
@bjorn I think @Chaoseiro's idea about using the Clipper Library could be a very cool in-editor feature (although if it exported that way it would still ultimately just be a QoL feature) because you could see the shapes that would ultimately result from it, nice outlines and all, and in fact, if the editor did it dynamically it could be included that way on export with no further trouble, I'd imagine. |
@bjorn any updates on this ? :) |
@orgertot No, it remains to be implemented. There's just so much stuff that could be improved, I can't get around to everything. Maybe you'd like to help? |
Currently only works for tile objects. Not yet implemented for tiles on tile layers. It does however deal with flipping, scaling, rotating and tileset drawing offset. It also works on both isometric and orthogonal maps. Issue #799
This became a priority request from a major patron, and has now been implemented. A new snapshot build should be available soon, which adds this feature as an on/off toggle. Collision shapes are rendered both for tile layers as well as tile objects, and support is included for flipped, scaled or rotated tiles/objects as well as for both orthogonal and isometric maps. |
Currently only works for tile objects. Not yet implemented for tiles on tile layers. It does however deal with flipping, scaling, rotating and tileset drawing offset. It also works on both isometric and orthogonal maps. Issue mapeditor#799
Rendering code for collision shapes now moved to the CellRenderer, which handles it for both tile layer tiles and tile objects. Closes mapeditor#799
Shapes created with the Tile Collision Editor are only visible within the Tile Collision Editor itself. For this ticket, I would like to see these shapes rendered to the primary map display, and toggled on/off.
The text was updated successfully, but these errors were encountered: