Coder Social home page Coder Social logo

Comments (11)

Kiamo2 avatar Kiamo2 commented on August 21, 2024 1

v1.2: All suggestions discussed here are implemented now.

from yati.

Kiamo2 avatar Kiamo2 commented on August 21, 2024

I suggest a new object class 'instance' (for rectangle, polygon, ellipse, point objects) + this custom property for the res file path.
I don't see any compelling reason why it has to be a tile object (which would normally lead to a Sprite2D).
Do you agree with this proposal?

from yati.

erniel avatar erniel commented on August 21, 2024

i actually like the implementation of tile object into sprite2D. i just find it better to have additional feature for tile object to use for res file path so that tiled and godot will have the same appearance.

image
image.
*screenshot from tiled godot4 exporter.

from yati.

erniel avatar erniel commented on August 21, 2024

additionally if tiled object has detected that it has collision shape and has a class of "static" or "area". it should turn into Area2D with Sprite and CollisionShape or StaticBody2D with sprite2D and CollisionShape when imported. this feature is present in vnen's tiled importer. godot-tiled-importer

from yati.

Kiamo2 avatar Kiamo2 commented on August 21, 2024

Ok, got it.

from yati.

erniel avatar erniel commented on August 21, 2024

ill show a screenshot of what i made previously on godot 3.5.
in here a tile object is detected with collisionshape and a class of "static"
image
at the same time the collision has a class of "one-way"
image
and this how it turns out in godot 3.5
image

also work the same if its class is "area"

from yati.

Kiamo2 avatar Kiamo2 commented on August 21, 2024

Thanks for the clarification, I didn't know that (never dealt with vnen's importer and Godot 3.5).
Very interesting.
I'll implement that but can take a few days.

from yati.

erniel avatar erniel commented on August 21, 2024

wow! thanks a lot for implementing it.

from yati.

erniel avatar erniel commented on August 21, 2024

im not sure if i should bring this up. this might be a user matter. in tiled the origin position is in lower left corner. while in godot, usually the origin is in the center. or depends on how they create the instance.

in my example. the origin of my instance is in the center. when imported. the instance is kinda off. godot x,y position follows the x,y coordinates of tiled which is in lower left corner.

image
image

would it be possible for you to update so that when imported it will match? im thinking of the godot x,y position should take the tiled X + (width/2) and Y - (height/2).
or implement another thing if you have something in mind.

from yati.

Kiamo2 avatar Kiamo2 commented on August 21, 2024

For rectangle objects the Tiled origin is the upper left corner. And that's were the .tscn "naturally" is placed and which works in my test examples. If the origin of your instance is not also the upper left corner but the center this of course does not match.
So the easiest thing might be to change the ladder position in your .tscn.
If this should be not enough for you I'm unsure what's useful without actually having your .tmx/.tsx and .tscn.
Would it then be possible for you to zip those and provide it somehow?

from yati.

erniel avatar erniel commented on August 21, 2024

Its fine, i guess ill just have to edit something on my end. overall the importer works great. Thanks

from yati.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.