I just started game development using unity, I’m trying to control my sphere moving on a flat surface using the W,A,S,D keys, if anyone knows the code for that using C# ,please help.

Answer :

colocho08

Answer:

Assembly c# code

Explanation:

First you must create the sphere.

Second you must declare the velocity variable.

Third we make the movement process with IF sentence

We can choose the arrows or the letters, W, A, S, D keys.

W = up

A = left

S = down

D = right

In this example only you must create the figure and make the relation with the variables.

I attached the c# code.

${teks-lihat-gambar} colocho08

Other Questions