This question was
closed Dec 30, 2017 at 07:15 PM by
daivwaras for the following reason:
Other
What script i need if i want push one block?
Its my player movement script. void Update () { if (Input.GetKeyDown("up")) { transform.Translate (0,0,1);
} if (Input.GetKeyDown ("down")) { transform.Translate (0, 0, -1); } if (Input.GetKeyDown ("right")) { transform.Translate (1, 0, 0); } if (Input.GetKeyDown ("left")) { transform.Translate (-1, 0, 0); } }
What script i need if i want push block ? All 4 sides. Sorry for bad english
Comment
Answer by MightyBearGameStudio · Dec 27, 2017 at 10:42 AM
Add a Rigidbody to the block and to the player.