i have a grid mesh that has a texture 16x16 blocks, how can i attach other actors to those locations on that grid? now i will have many of thesegrids so performance issues may happen :3
do i manually add locations or how can i set actor to one of these blocks?
Set the grid snap size to 50 (in your screenshot set to 1 - see the icon), imho that’s pretty much the standard grid snap size for placing assets. Will probably not align with the checkers visual of your mesh, but it has no texture yet anyway.
If you are using a line trace or cursor location to place the object, you can find the snapped position by breaking up the location vector into it’s components and using multiplication, division, and rounding. For example, if you wanted a grid size of 5, you would divide each component by 5, round that value to the nearest decimal, and multiply the result by 5. If you need further clarification, let me know.
EDIT:
Here is a pure function used to find the nearest grid point:
Obviously then the challenge would be to create the placement logic. For example, making sure you’re not placing two objects in the same exact location.