#Adding custom data to 3D tileset (Gridmap)?

4 messages · Page 1 of 1 (latest)

primal moss
#

Hello! I'm trying to set up footsteps for my game which uses a 3D tileset, however I'm a bit stuck on having the player be able to detect what type of tile they're standing on. I figured maybe if I enter the type into the surface name I could check that in script somehow, but it seems that it's not exposed in any way. 2D tilesets seems to offer the ability to add custom data to each tile, am I going about this the wrong way using a gridmap maybe?

Any tips on how I can do this? Anyone who has dealt with a similar problem; and if so how did you solve it?

Thanks in advance! 😁

craggy totem
# primal moss Hello! I'm trying to set up footsteps for my game which uses a 3D tileset, howev...

tilemaps have much more functionality, probably because they are used more compared to gridmaps. so there isn't any built in functionality like that. however a gridmap just defines the content of its cells as an index in its list of meshes, so you could easily create your own list that uses the same indexes and contains the data belonging to the respective mesh. But the annoying part would probably be filling the list with all the entries in correct order.

primal moss
#

Hat and Tie to the rescue again! I see, so I have to create a dictionary that describes what type each tile is by ID, and then in the player script just find which tile ID the player is standing on from the gridmap, and then cross check that with the dictionary? I'm not completely confident how to go about that yet, but that definitely helps me get started on figuring it out if that's correct?

craggy totem