Skip to main content

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

sorry but I am not in 2d

Here is how to make 3D movement with transform.

float h = Input.GetAxisRaw("Horizontal");
            float v = Input.GetAxisRaw("Vertical");
            transform.Translate(h * Time.deltaTime * speed, 0f, v * Time.deltaTime * speed);


Remember to create a public float for the speed variable. Like this.

public float speed = 5f;

You can change 5f to what ever you want. Just make sure to add f at the end. Example: 10f or 15f.

And you can still do physics.

I hope this helped.

Thanks