Games Tiled and turned graphics

Discussion in 'Game Development' started by Gunther, Dec 5, 2018.

  1. Gunther

    Gunther Active Member Licensed User

    With Tiled it is really easy to insert graphics into the world until the receiving box/body is not rotated.

    Please have a look to the arm and leg on the left side they are streched somehow. Reason is that the graphic was cutted in a upright orientation and the receiving box is turned away from the upright position.

    On the far left (the single leg and arm) I turned the graphic in Tiled and added a turned receiving box to it. Than it is not streched, but the Fixture is much bigger compared to the boxes on the left side.

    This bigger fixture may have a bad impact to collisions or if the right leg shall done by the reuse of the graphic and you put the box in Tiled where it should be for the right leg (looks ugly).

    Can the X2Tiled be adopted so that if the receiving item is rotated the picture shall be rotated as well before it will be fitted to the boxes?

    See the attached project for the JSON.

    upload_2018-12-5_13-17-20.png

    Set the custom property of "graphic keep aspect ratio" to ticked doesn't help that much:

    upload_2018-12-5_14-28-37.png
     

    Attached Files:

    Last edited: Dec 6, 2018
  2. Erel

    Erel Administrator Staff Member Licensed User

    You should use a polygon instead of the rotated rectangle:

    [​IMG]

    [​IMG]

    (it is better to do it with the leg image instead of the full image)
     
    Peter Simpson and Gunther like this.
  3. Erel

    Erel Administrator Staff Member Licensed User

    Note that you haven't defined the Touch event correctly.

    The X and Y parameters types should be Float not Double. This will cause an issue in debug mode.

    It is never a good idea to write the event signatures yourself. Let the IDE write them for you.
     
  4. Gunther

    Gunther Active Member Licensed User

    Thanks for mentioning. It rose from a F4 replacement of float
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice