When placing 3d tiles, such as coins, etc., is there an easy way to make them Raycast before placement to let them take into account the height or distance from an underlying mesh’s normals (and then place them at that y/z height?) while still placing them at the same x/z location on the tilemap otherwise?
For example, say I created a mesh that has nice 3d slopes and edges in its geometry (blue lines in my attached example), but that geometry was mostly 2d-aligned to the Tilemap grid (black/grey lines in attached example). As you can see, it’s a 2D tilemap grid, but each tile’s vertical (or depth) placement is the only thing that’s altered from the standard behaviour when placing tiles with the brush tools:
In its layout, this example mesh uses ~1 to 2 units of the tilemap per facet [mostly] across the 3d mesh (even on slopes!) with an optional maximum height/depth distance for the raycast to test before canceling the potential placement of a tile (currently being the orange/yellow coin in the attached image, for example), all aligned mostly to the tilemap grid in every way EXCEPT for accounting for specific depths or heights during placement, as that RayCast test would decide this instead of placing the coins/tiles at a default height everytime). If one were to place a block of those tiles/coins, the raycast check would take place at every cell and place them en-mass on all the geometry that passes that check (assuming it’s enabled), and picking tiles to copy would also account for the Tilemap’s RayCast max distance check too. This could possibly even use the attached collider to Cast to the geometry below in order to check the whether it touches geometry below it instead of using the raycast.
Theoretically, this could even handle hills and smooth sloping terrains made out of such stuff as heightmaps, but using a grid to place stuff on top of it squarely instead of manually placing it and trying to optimize for it later.
In cases where there is overlapping geometry, for example just behind the slope near the “No Geometry” area where the top of that slope overlaps the tile below, one could even specify a “startingHeight” to determine at what vertical location the RayCast/Cast takes place so that if you really need to place something below an overlapping section, you could specify the height the tile placement will start looking (ignoring anything above that height, assuming geometry is not colliding while using the Cast functionality).
No idea whether this can be done yet or not with the system, but it would be incredibly awesome to have such an option for those of us who’d love to use the built-in tilemap and brush system to do this sort of thing!