Paper2D | Getting the tile coordinate in tilemap

Hello developers! I’m interested in one question. How do I get the tile coordinate value in tilemap by clicking on it with the mouse, thus I would be able to edit this tile.
This example code that was given is not working for me

according to the specified response, it returns the same value, which does not even match tilemap


Could you explain the procedure or give me an example, I would be very grateful.

Hey @Patentvest!

So the problem here is… We don’t know anything about your code! You posted the example you’re going by, but we need context for your project. Because the code they have there is fine- as long as you’re using X and Z as your axes for the tilemap. :wink:

Try to bring any screen snips or anything pertinent to this, and we’ll revisit it! :slight_smile:

1 Like

In general, everything worked! The calculation data from the example is really correct, the only thing I needed to add was tracing the line through the channels, because without it the code refused to work properly. Thanks for the reply.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.