Unity C# Move an Object with a Key press

Published: 16 August 2015
on channel: Design and Deploy
14,769
40

How to move a player with key strokes.

First, drag the image into the Asset section and then into the scene.

Second, add a Rigidbody2d, this allows for the application of physics to the object, and set gravity to 0.

Third, add a script which defines the key strokes you wish to check for.

Fourth, add the IF statements to declare what should happen when those keys are pressed.

Lastly, add the velocity statements.


Watch video Unity C# Move an Object with a Key press online without registration, duration hours minute second in high quality. This video was added by user Design and Deploy 16 August 2015, don't forget to share it with your friends and acquaintances, it has been viewed on our site 14,769 once and liked it 40 people.