Creating a 2D Maze
Hi, I'm trying to create a 2D top-down maze game, where the player drags a snake-like sprite around a maze with curved walls. My main question is regarding colliders.
The best way I can think of to make the maze itself is to create a sprite with the maze paths cut out of it, and then use a polygon collider to define the walls. In order to get the snake sprite to move smoothly, at the moment I've applied a circle collider to each segment of the snake sprite. The segments are then linked together with hinge joints, and have a low friction texture on them so that they move smoothly around the maze.
This seems like a bit of a crappy solution to me and I was wondering if there's a way to avoid using colliders for the maze altogether. Is there any way to draw a curved line that would act as a path for the player to drag the snake along - one that the sprite won't be able to deviate from? If this was the case I wouldn't have to worry about snagging or complex polygon colliders for the maze.
Hope that makes sense, thanks.
Your answer
Follow this Question
Related Questions
2D Dragable Boxes Move Into Each Other 0 Answers
How to make headlight effects on a sprite? (Increasing emission of sprite material) 0 Answers
Sprites moving (shaking) during animation while they should not 1 Answer
Sprite loses quality when imported into unity. How to fix it? 0 Answers
Unity2D animation and sprite layout 0 Answers