Comments (17)
This feature was previously requested here: http://sourceforge.net/apps/mantisbt/tiled/view.php?id=23
(closing the issue in the old bug tracker as a duplicate now)
It would indeed be a nice feature!
Example use-case from the old issue: http://www.cocos2d-iphone.org/forum/topic/2338
from tiled.
Jumping in over here... I did this for my own project in cocos2d and my rotation format was the same as the binary GID format, then compressed, so it looked the same, inside a layer level. It would be fairly straightforward to implement (0..359 degree integer rotation), but I'm not sure how the UI would work. Would the rotation act as a property maybe, or something else?
from tiled.
@slycrel I'd expect the rotation to be a floating point attribute similar to QGraphicsItem::rotation. When saving it would be stored like:
<object gid="123" rotation="60" />
This is strictly about object rotation (though of course also tile objects), and not about rotation for the tiles on a tile layer. I'm not sure how useful that would be since you can't freely position those tiles either.
For the GUI I'd probably add some handle for rotating the object, similar to the way it works in Inkscape.
from tiled.
Thanks bjorn. For what I did previously, flipping will cover what I was using rotation for. http://www.cocos2d-iphone.org/forum/topic/16552 Essentially I was rotating tiles in place for terrain edges. Flipping is the same difference really.
I'll have to poke around at the source some and try to get a better grip on how Tiled sees things. I don't think of tiles as objects, more as painted items based on GIDs, probably because of how cocos2d deals with them. And I won't get this done overnight, but it would be a fun project and I'm already partially there, so we'll see what happens. Thanks for the input. =)
from tiled.
I don't think of tiles as objects either, hence you hear me say "tile objects" when I'm talking about an object that uses a tile to represent itself. :-)
Support for such objects was added to Tiled Qt with version 0.6.0, which isn't very long ago compared to the time that cocos2d-iphone has supported Tiled, hence I wouldn't be surprised if it doesn't support them yet (I haven't checked).
from tiled.
Better still, of objects didn't need to be boxes. They could be polygons, made up of a number of points.
Then you'd have a full Box2D level editor in Tiled too, as well as a tilemap editor!
from tiled.
@Chicknstu Support for polygon objects is already done for the next release, check out the master branch or try a Windows daily build from http://files.mapeditor.org/daily :-)
from tiled.
@bjorn awesome. Exactly what I was hoping for! As far as I can see this is pretty much removes the need for rotated rectangle objects. Maps perfectly (excuse the unintended pun) to 2D physics systems.
from tiled.
Not sure if this is worthy of it's own issue thread so I'll just mention it here. When placing new polygons, it's easy to place multiple points at the same location, particularly the first point as it's hard to see that the polygon has been started. Perhaps it could ignore any points that match the previous point.
from tiled.
@Aranda Nice suggestion! Pushed as commit 058c752. :-)
from tiled.
any updates on this? I'm going to be starting a new game soon and having tile objects that can rotate and flip will be very valuable to me. Right now I need to either create multiple versions of the tile graphic, or set scale and rotation properties. It's not ideal as sometimes I'm not the only person creating levels and people tend to forget these properties exist.
from tiled.
@mrmalee This issue is about free rotation support for objects. However, it seems you are talking about issue #58 (with the addition of the diagonal flip bit)?
from tiled.
both would be nice. But flipping would benefit my project more than rotation.
from tiled.
Isn't this solved by pull 168?
from tiled.
@crazysam Not really. That pull request does not actually rotate the object at all, it only adds an 'angle' properly that is visualized with an arrow. That's the functionality its author needed, not for the objects to rotate. Personally I think that angle arrow is a rather rare and specialized use-case hence I have not merged it yet.
from tiled.
Ohh, that's odd, would it be difficult to rotate the object in the level based in the angle specified in the properties window?
from tiled.
@crazysam It should be easy for orthogonal maps. For isometric maps the question is how the rotation should be interpreted. If it would work the same way, the rotation could be done on the QGraphicsItem
representing the object.
from tiled.
Related Issues (20)
- Idea: To export Objects Only JSON file HOT 2
- Add a Selected Tile Preview to "Shape Fill Tool", just like the "Stamp Brush" has HOT 6
- tmxrasterizer's --hide-layer doesn't work with group layers HOT 1
- Scripting: Access Terrain Properties
- Issues compiling in Windows (newbie) HOT 3
- Automapping stops working when a project's rules.txt is modified during runtime. HOT 3
- "Blob Tileset" points to a broken link HOT 2
- Add map.fileName in tiled.registerMapFormat -> write HOT 2
- Unable to open a tmx file with a space in the filename using AppImage with the shell HOT 2
- Error with `libtiled` in Java 21: `java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException` HOT 1
- Any AI generated plugin? HOT 1
- Tile Animation Editor may not show additional tiles if source image resized
- World Map chunks getting loaded twice. HOT 4
- Scripting: Signal for brush changing
- Layer Blend Mode Property HOT 2
- Switch keyboard shortcuts for "Save As" and "Save All" HOT 3
- Custom Type Search/Filter HOT 2
- Patterned document background option
- AppStream metadata screenshots are missing a caption
- tileset not displaying HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tiled.