Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // count the next body piece number (wrapping to zero):
- bodyPieceNum++;
- bodyPieceNum %= bodyPieces.length;
- // place the next 'body piece' at the old head position
- bodyPieces[bodyPieceNum].position = transform.position;
- // move the head to the new position
- x += moveX;
- y += moveY;
- transform.position = Vector3 ( x * gridSize, 0, y * gridSize);
Advertisement
Add Comment
Please, Sign In to add comment