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]
4 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]4 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
What must your motherboard have to use bitlocker encryption in windows 7 which will ensure that your hard drive cannot be used i
Gala2k [10]

your motherboard must have TPM Chip to use bitlocker encryption in windows 7 which will ensure that your hard drive cannot be used in another computer.

<h3 /><h3>What is a motherboard?</h3>
  • The primary printed circuit board (PCB) of all-purpose computers and other extensible systems is called a motherboard.
  • The primary printed circuit board (PCB) of a computer is called the motherboard. All components and external peripherals connect to a computer's motherboard, which serves as its main communications hub.
  • It offers connections for various peripherals and retains and enables communication between many of the critical electrical parts of a system, including the memory and central processor unit (CPU).
  • In contrast to a backplane, a motherboard frequently houses important sub-systems such the central CPU, input/output and memory controllers for the chipset, interface connections, and other parts that are integrated for general usage.
  • Specifically, a PCB with expansion capability is referred to as a motherboard.

To learn more about motherboard, refer to the following link:

brainly.com/question/15058737

#SPJ4

6 0
2 years ago
_________ is the primary measurement used to gauge your typing ability
Reil [10]

Answer:

Words per minute

Explanation:

5 0
3 years ago
Select the correct answer from each drop-down menu. Kristian is a cybersecurity professional. She is writing a book called The D
Papessa [141]

Data sharing, maintaining security

<u>Explanation:</u>

Kristian is a cybersecurity professional. She is writing a book called The Door Toward Cybersecurity. Organizations should avoid any data <u>sharing or exchange</u> while servers are transmitting information. This will help organizations keep the information intact and maintain <u>security.</u> If any info or data shared when the servers are transmitting the info, then it may lead to the loss of security, and the information gets leaked. So it must be avoided to share while transmission of info using the servers.

3 0
3 years ago
Read 2 more answers
Once a business determines that change needs to occur, what ahould the
Lady bird [3.3K]

Answer:

D. Business strategy

Explanation:

Kono Dio Da!!

7 0
3 years ago
What Security Issu E Commerce ?​
Andre45 [30]

Answer:

e means we don't know so I can't tell the answer

5 0
2 years ago
Other questions:
  • The underwriters laboratories (ul) requirement for ? ground-fault circuit interrupters (gfcis) is that tripping shall occur when
    5·1 answer
  • If a computer is capable only of manipulating and storing integers, what di themselves? How are these difficulties overcome
    13·1 answer
  • Hello, please help write code in C++. Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go nort
    12·1 answer
  • A thin red border indicates the active cell. (True or False)
    12·1 answer
  • The seven basic parts of a computer are
    10·2 answers
  • A person who creates a computer virus is a (1)system analyst (2) techician(3) programmer​
    11·2 answers
  • 3s X 82 = X +y? is this true
    10·2 answers
  • Is there such thing as free will
    12·2 answers
  • Why should we learn Ethereum? Explain.
    8·1 answer
  • If your computer is frozen what is something you would do to troubleshoot the problem ​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!