![]() Nodes.position = new Vector2(-2.90f, ) Īlso, unless you somehow increment the two LerpTime variables, you're misusing the Lerp function, and you don't need it in this context either. Nodes.Translate(Vector3.up * ltaTime * 4) Nodes.Translate(Vector3.right * ltaTime * horizontalInput * 10) Vector3 pos = _ įloat horizontalInput = Input.GetAxis("Horizontal") Snake Vs Block online edition is coming, let's play it with our friends In this game you need to pay attention to the number on your snake, if the number is 0, you will lose your game. It should look like this: public void Move() Snake Vs Block is an online fun game that we hand. When you moved all the nodes, move the node 0 according to the user input. Swipe your finger to guide a snake of balls and break the bricks.Then for each i node, assign it the position of the i-1 node.Assing this node the position of the (n-1)-th node.If I understand what you want to do, you should approach this in the reverse order. However I still can't obtain the smooth snake movement like in the real games. Instead of having the snake move upwards, the snake stays in the same position and the blocks move downwards. UPDATE: I changed the basic logic for the snake movement in my game. Nodes.position = Vector2.Lerp(Nodes.position, newPos, ltaTime * 10) Nodes.position = Vector2.Lerp(Nodes.position, newPos, ltaTime * 14) Nodes.GetComponent().velocity = new Vector2(curPos.x -, 0) * 20 The best starting point to discover snake games. If (Input.GetMouseButton(0) & () = false & Nodes.Count > 0)ĬurPos = (curPos) Get additional balls and make the biggest snake ever Very easy to play but very hard to reach high scores Game Features: Free to play Endless gameplay. Want to play Snake Games Play Sushi Party, Snake.is MLG Edition, Paper.io and many more for free on Poki. I'm wondering if anyone has a solution to this. This is my current code which does work as a snake movement but does not follow the exact path of the next node. What's special about the snake movement in the game is that the previous node follows the next ones path perfectly, both in X and in Y. Most of the physics are pretty straight forward but I cannot seem to re-create the snake movement. I am trying to re-create the popular SnakeVSBlock mobile game.
0 Comments
Leave a Reply. |