I have created a hex based grid and want to make something move to the hexagon that is clicked, how do i do this??
Once approach maybe:
- Add a ‘Tag’ to every static mesh. Add all the meshes to an array.
- Use Deproject-Screen-To-World to get a distant 3D ‘Target’ point from 2D mouse.
- Do a Line-Trace between center-screen and this 3D target point (2d-mouse point)
- If you hit something, get the Tag (if one exists) for the hit actor or mesh etc.
- Use that to iterate through the array via string comparison. If found store the index!