#I agree with you can you make a thread

1 messages · Page 1 of 1 (latest)

violet comet
#

so, if i create a new script to attach to a player, i already have a grid in my scene from making a tilemap earlier, and i can add a serialized field in the script to plug in the grid

odd plank
#

what's your current problem again?,

violet comet
#

i just want to attach movement to a grid and before every move check for obstacles

odd plank
#

using raycast right?

violet comet
#

i was, but i shouldnt need to if i use a grid then just check the attributes of a space on a grid, right?

vague loom
#

I would suggest using some of the ideas in this video. [https://www.youtube.com/watch?v=kkAjpQAM-jE&t=225s&ab_channel=Tarodev]

Create a grid in Unity of any width and height. I'll show you how to create a checkerboard pattern to better distinguish each tile as well as how to hover and select each individual tile.

Perfect for any tactics or turn-based game.

GridManager.cs: https://pastebin.com/cip74C4E
Tile.cs: https://pastebin.com/UD6zE467

=========

❤️ Become a Tar...

▶ Play video
violet comet
#

i was using boxcast

vague loom
#

It sounds like everything you need

violet comet
#

👍 ill check it out

vague loom
#

kk

violet comet
#

reviving dead-ish thread, this makes a nice box with tiles, but if i wanted to actually map a grid with attributes, how would i go about that? like, if i wanted to have a grid and a row of pawns (chess) spawn on points in the grid as opposed to just points on the screen or something

#

like i feel like the video is backwards in terms of it makes the tiles and then it gives then names (x,y) and then you can get the tile through a public method

odd plank
odd plank
odd plank
odd plank