1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
MArishka [77]
3 years ago
11

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.
Computers and Technology
1 answer:
uysha [10]3 years ago
6 0

Answer:

Explanation:

public class Controlador: MonoBehavior

{

// we declare velocity variable, we can change the value to get more speed

public float velocidad = 3f;

void Start()

{

 

}

void Update()

{

// with this condition we select the key for the movement.

// for example the left arrow or the letter "a"

  if (Input . GetKey(KeyCode . LeftArrow) |I Input . GetKey("a"))

  {

    transform . position += Vector3 . left * velocidad * Time . deltaTime;

  }

   if (Input . GetKey(KeyCode . RightArrow) |I Input . GetKey("d"))

  {

    transform . position += Vector3 . right * velocidad * Time . deltaTime;

  }

   if (Input . GetKey(KeyCode . UpArrow) |I Input . GetKey("w"))

  {

    transform . position += Vector3 . up * velocidad * Time . deltaTime;

  }

   if (Input . GetKey(KeyCode . DownArrow) |I Input . GetKey("s"))

  {

    transform . position += Vector3 . down * velocidad * Time . deltaTime;

  }

}

}

You might be interested in
When seeking information on the Internet about a variety of subjects, the most
liq [111]

Answer:

wikipedia

Explanation:

they have like almost everything.

6 0
3 years ago
Read 2 more answers
How does computer network work in a paragraph
Maksim231197 [3]

You go in to the networks crosh/Linux and you insert the info you want in code

7 0
3 years ago
What are the most common types of cables in a network?
Maru [420]

the most common are twisted pair, coaxial, Ethernet cross over, and fiber optic.

4 0
3 years ago
When a JSP page is compiled, what is it turned into?
77julia77 [94]

Answer: Servlet

Explanation: JSP page compilation is the process of compiling of the file before it can be turned towards the live server .There is a request that is made towards the JSP page  then is compiled into a JSP servlet. Before the execution of the JSP program, it is turned in to a JSP servlet .JSP is a program that work on the server side and reduce the work load of the developers.

5 0
2 years ago
Which of the following is an example of an application software?
pishuonlain [190]
Word processing software
6 0
2 years ago
Other questions:
  • Please answer this correctly the underline drop down menu in the font group contains options to underline
    13·1 answer
  • Jenny is working on a laptop computer and has notices that the computer is not running very fast. She looks and realizes that th
    6·2 answers
  • If johnny has 800 socks and john has 1000 more how much does john have
    9·1 answer
  • Given the following function definition, what modifications need to be made to the search function so that it finds all occurren
    7·1 answer
  • You change a document that is saved on your computer by cutting text from the document what happens to the text when you preform
    5·1 answer
  • How are logical operators used?
    14·1 answer
  • You scan the network and find a counterfeit access point that is using the same SSID as an already existing access point. What i
    12·1 answer
  • James root lol ........................
    12·1 answer
  • 7.4 Lesson Practice (projectstem): what is output if the user is enters 2?​
    8·1 answer
  • The direction of a ratchet is reversed by _______________________.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!