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
_____________________________________________________is a pre-designed format to help users with the creation of a document, lik
Naily [24]
C template......................................
8 0
2 years ago
Which of the following technologies is the best choice to convey urgent and highly sensitive information?a. Telephone b. Fax Let
Setler79 [48]

Answer:

C. E-mail

Explanation:

Electronic mail is the best choice to convey urgent and highly sensitive information

8 0
3 years ago
Which of the following is true for an API?
navik [9.2K]

Answer:

c

Explanation:

4 0
3 years ago
Which new development in malware caused sandbox technology to automate and introduce artificial intelligence learning
Karo-lina-s [1.5K]

AI-driven attacks caused sandbox technology to automate and introduce artificial intelligence learning. AI and machine learning can be used to fight against malware attacks.

<h3>Artificial intelligence, machine learning, and malware</h3>

Artificial intelligence (AI) refers to the ability of a PC to perform tasks done by humans due to the requirement of discernment.

Machine learning is a subdivision of (AI) based on the use of data and algorithms to mimic human learning.

Malware is malicious software generated by cybercriminals, which are capable of stealing unauthorized information.

Learn more about malware here:

brainly.com/question/399317

4 0
2 years ago
If not cleared out, log files can eventually consume a large amount of data, sometimes filling a drive to its capacity. If the l
OLEGan [10]

Answer:

<u>/var</u>

Explanation:

The /var subdirectory contains files to which the system writes data during the course of its operation. Hence, since it serves as a system directory, it would prevent log files from consuming a large amount of data.

7 0
3 years ago
Read 2 more answers
Other questions:
  • What does prominent hyperintensity mean relating to MRI?
    5·1 answer
  • Will the Python code below print something? And will it terminate?
    9·1 answer
  • To under a clip art you must do the following.
    14·1 answer
  • Help!!!!!!!!!!!!!!!!!
    11·1 answer
  • When using the Common Internet File System (CIFS), which security model does not require a password to be set for the file share
    7·1 answer
  • if a user has one column in a table and would like to make it into two columns which command should be used
    13·1 answer
  • What is the difference between mutex lock and race condition​
    6·1 answer
  • Write a program that prompts the user to enter three words. The program will then sort the words in alphabetical order, and disp
    14·1 answer
  • The equals method of the Object class returns true only if the two objects being compared:_________
    15·1 answer
  • Windows 8 uses a(n) ________ account for easy access and storage of online files.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!