-
Notifications
You must be signed in to change notification settings - Fork 35
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
Added support for one-way collision shapes #51
base: master
Are you sure you want to change the base?
Conversation
- In Tiled, select a tile collision shape to show the properties in the left panel - Under the property "Type" (or "Class" in Tiled 1.9) use the value "one-way" - Export the tileset to Godot. Other notes: The "one-way" className/type on the collision shape is the same method employed by godot-tiled-importer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, and the compatibility with the Godot Tiled Importer is nice (does that actually apply to anything else?). What about adding support for setting the one_way_margin
while you're at it, or is that property not useful?
I'm not entirely sure, I haven't used it extensively, but enough to remember that particular aspect.
You bring up a good point which might affect the above choice. This plugin already uses a property naming scheme to define Godot node values. Eg. So, perhaps we can set the following custom properties per collision shape:
Any thoughts on this scheme vs the className? |
@sixthgear Hmm, indeed setting these based only on a properties rather than the Class does seem more suitable. |
Please commit (I think?) this seems really useful. |
It's already committed. There was a short discussion about this change, resulting in an open task (moving this to be based on the listed properties (boolean "godot:one-way" and number "godot:one_way_margin") rather than on the class name ("one-way"). This was suggested by @sixthgear and I agreed, but it seems they never got around to actually making that change. |
Usage
Other notes: The "one-way" className/type on the collision shape is the same method employed by godot-tiled-importer