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
Microsoft Paint can be described as a digital sketch pad ?
alexira [117]
Yes I can be be a digital sketch pad

HOPE THIS HELPS!!!!!!!
4 0
3 years ago
Which of the following is NOT a type of cable used in wired networks?a) Unshielded coaxialb) Coaxialc) Unshielded twisted-paird)
zysi [14]

Answer:

I think it is unshielded coaxial. Not 100% sure.

Explanation:

5 0
4 years ago
2 4.1.2 Quiz: Information Systems and Business Planning
Delicious77 [7]

Answer:

Option D

Explanation:

Complete question

A management information system is typically used by _____.

A. all levels of employees

B. company executives

C. upper-level managers

D. middle-level managers

Solution

A management information system is typically used by middle-level managers

Option D is the correct answer

Management information system (MIS) helps the middle managers to control the work across the various teams of organization.

5 0
3 years ago
Who wants to join my go.ogle classroom?
Ostrovityanka [42]

Answer:

sure

Explanation:

8 0
3 years ago
Read 2 more answers
The most common approach for making individual analysis is to:
stiks02 [169]

Answer:

A)predict future organizational needs.

Explanation:

It is important to perform a SWOT analysis. Which helps us predict future business needs. Highlighting strengths, weaknesses, opportunities and threats.

  1. analyzing its internal characteristics (Weaknesses and Strengths).
  2. external situation (Threats and Opportunities) in a square matrix.
8 0
3 years ago
Other questions:
  • A pizza cutter is a compound machine made up of what simple machines?
    7·1 answer
  • What does an operating system do?
    11·2 answers
  • Pls help is very urgent and I will mark u as brainliest plsssss​
    11·2 answers
  • Define a method named roleOf that takes the name of an actor as an argument and returns that actor's role. If the actor is not i
    11·1 answer
  • Which company became a digital media leader in 2013 as a result of its horizontally integrated distribution system that branched
    12·1 answer
  • What is one reason that writing effective messages is so important
    11·2 answers
  • The index used by the OS to manage computer files is called _____.
    13·2 answers
  • What are your thoughts about this re-designed Logo? Is it good? Or is poorly designed? Explain your answer below.
    13·1 answer
  • Hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
    14·2 answers
  • How does the dns help the world wide web scale so that billions of users can access billions of web pages?.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!