- Home /
sliding rows of tiles in 3D
Hi all--
I am working on a game where you slide entire rows of tiles at a time by swiping. (see screenshot) When a tile gets swiped off the edge of the map, it reappears at the opposite end of the row.
I am able to let the user slide one tile at a time by swiping, but I'm not sure how to get the whole row to slide, and have the end object reappear at the other end.
Can anyone point me in the right direction, or suggest how i could best manage the objects?
Thanks!
[1]: /storage/temp/86617-screen-shot-2017-01-23-at-30720-pm.png
Have a 2-dimensional array that keeps references to each of you tiles, so you can access each one with the correct xy coordinate. That will allow you to not only access the one you are clicking at or sliding, but also it's neighbors (+-x, +-y) or a whole row or column.
Your answer
Follow this Question
Related Questions
Football penalty game- Move gameobject in direction of swipe with force 0 Answers
Issues implementing a tiles asset. 0 Answers
Translate a 2D position to a 3D space 1 Answer
3D Terrain Tiling Graphic Artifact 2 Answers
Detect swipe along 3d arrows 1 Answer