Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

public float moveSpeed;

void Update{

float horiz = Input.GetAxis("Horizontal") * moveSpeed;

float vert = Input.GetAxis("Vertical") * moveSpeed;

transform.position += transform.foward * vert * Time.deltaTime;

transform.position += transform.right * horiz * Time.deltaTime;

}

For this script it's pretty simple and if you didn't mess with the Input Manager (Edit>Project Settings>Input Manager>Axes) Then it will grab the horizontal and vertical inputs which goes for both WASD and Arrow Keys and will even work for controller if you wanted that. 

Pog gamingnerd the guy seemed as he was struggling and i have no experience in 3d lol