You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
code fix
Insert at line 361 in tiled_map_reader.gd:
if "point" in object and object.point:
var point = Position2D.new()
if not "x" in object or not "y" in object:
print_error("Missing coordinates for point in object layer.")
continue
point.position = Vector2(float(object.x), float(object.y)) if "rotation" in object:
point.rotation_degrees = float(object.rotation)
point.visible = bool(object.visible) if "visible" in object else true
...
The text was updated successfully, but these errors were encountered:
Hmm, in fact in Tiled, point objects can't be rotated. I guess this is something I've disabled after this issue was opened (though they could not be rotated already when mapeditor/tiled#1799 was merged).
I can see it has its uses though, as demonstrated by the provided example, so maybe it's worth properly supporting at some point.
Plugin version
2.3
Issue description
Rotation is not imported for Point objects. It is useful for game logic.
Steps to reproduce
Sample map or tileset
TestTrack.zip
code fix
Insert at line 361 in tiled_map_reader.gd:
if "point" in object and object.point:
var point = Position2D.new()
if not "x" in object or not "y" in object:
print_error("Missing coordinates for point in object layer.")
continue
point.position = Vector2(float(object.x), float(object.y))
if "rotation" in object:
point.rotation_degrees = float(object.rotation)
point.visible = bool(object.visible) if "visible" in object else true
...
The text was updated successfully, but these errors were encountered: