-
Notifications
You must be signed in to change notification settings - Fork 26
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
Change coordinate system #8
Comments
So I managed to 'fix' it somewhat by changing this line:
to this: And wrote a func based off the redblob site to get an offset (oddq) coord:
This results in the hex grid rendering correctly based off of offset_coords: Getting close! Unfortunately, this causes the The code:
Any ideas? |
Most of the operations internally use the axial coordinate system, hence Instead of changing this behaviour you can leave everything as is and extend the
and then your loading code could look something like this:
|
Hi there, I've been playing around with this plugin. Recently I wrote a json importer that takes a hexmap generated from the application Tiled (https://www.mapeditor.org/) and imports it into godot with some very minor shaders.
My issue lies with how:
Tiled, unfortunately, only allows the origin to be in the top-left and
+y => S and +x => E
.I created a map that looks like this in Tiled:

Unfortunately when I render it using

get_hex_center(Vector2(x,y))
I get the map quite skewed:I'm wondering if there is a method to adjust the coordinate system to align closer to something like Tiled.
My rendering code on load:
The text was updated successfully, but these errors were encountered: