-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Point objects: rotation not imported #131
Comments
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: