Gunther Active Member Licensed User Longtime User Dec 5, 2018 #1 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. Set the custom property of "graphic keep aspect ratio" to ticked doesn't help that much: Attachments Tiled Streching.zip Tiled Streching.zip 88.4 KB · Views: 707 Last edited: Dec 6, 2018
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. Set the custom property of "graphic keep aspect ratio" to ticked doesn't help that much:
Erel B4X founder Staff member Licensed User Longtime User Dec 5, 2018 #2 You should use a polygon instead of the rotated rectangle: (it is better to do it with the leg image instead of the full image)
You should use a polygon instead of the rotated rectangle: (it is better to do it with the leg image instead of the full image)
Erel B4X founder Staff member Licensed User Longtime User Dec 7, 2018 #3 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.
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.
Gunther Active Member Licensed User Longtime User Dec 7, 2018 #4 Thanks for mentioning. It rose from a F4 replacement of float