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") It should look like this: public void Move() When you moved all the nodes, move the node 0 according to the user input.Then for each i node, assign it the position of the i-1 node.Follow the on-screen instructions to begin the process. The Total Registry Revitalizer tool screen will open. Locate Total Registry Revitalizer and then click Start. Click Toolbox -> All-in-one Tools and then scroll down to Specialized Tools. Avoid high strength blocks then your snake length otherwise snake will die in Snake vs Blocks game. A block you destroy will increase score by one in snake game. Eat the balls on the road to increase snake length. Assing this node the position of the (n-1)-th node Run Total Registry Revitalizer from System Mechanic. HOW TO PLAY - Touch on screen and swipe to left or right to move snake.If I understand what you want to do, you should approach this in the reverse order. Snake VS Block is a HTML5 game where you to guide this snake of balls and try to break all blocks in the game to score. 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 If (Input.GetMouseButton(0) & () = false & Nodes.Count > 0)ĬurPos = (curPos) 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. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |