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
NikAS [45]
2 years ago
5

What happens when you create a variable in a video game program?​

Computers and Technology
1 answer:
gulaghasi [49]2 years ago
7 0

Answer:

A lot can happen, depending on the use of the variable

Explanation:

Lets create a position variable, a common variable in games.

Vector3 position = new Vector3(0, 0, 0);

The above variable initialization creates a new Vector3 object. The Vector3 class contains 3 properties, X, Y, and Z. When you assign the variable 'position' the new Vector3 object, the variable 'position' contains an instance of Vector3 where

X = 0,

Y = 0,

and Z = 0.

The variable 'position' can be used to set the position of a player, or an object.

We can reuse this variable when you want the object or player to move.

position.X = 29

position.Y = -14

position.Z = 47

now the object/player's position is (29, -14, 47).

Variables can be used for basically everything you need in programming, from storing a position, to storing the result of a complex math equation.

You might be interested in
Question / UJU
DIA [1.3K]

Answer:

Option D: If it is the month of January, then the temperature is cool.

Explanation:

A conditional statement is the one having an if condition in it that says, if the condition is true proceed to the next statement, else not.

Given statements are:

  • If it is the month of January, then it is winter.

This can be written as: if (January)⇒Winter

  • If it is winter, then the temperature is cool.

This can be written as: if (winter)⇒ Temperature(cool)

So by combining both the statements, the winter clause will be connected  and we get:

if(January)⇒Temperature (cool)

This can be written as:

  • If it is the month of January, then the temperature is cool.

So, Option D is the correct answer.

i hope it will help you!

5 0
3 years ago
The ________ is the main switch station for memory; if the right and left areas are destroyed, the result is widespread amnesia.
Scorpion4ik [409]

Answer:

The answer is hippocampus.

Explanation:

The ___hippocampus._____ is the main switch station for memory; if the right and left areas are destroyed, the result is widespread amnesia. The __hippocampus.______ is the main switch station for memory; if the right and left areas are destroyed, the result is widespread amnesia.

4 0
2 years ago
Which one of the following is considered a peripheral? A Software B Mouse C USB connector D Motherboard
Bogdan [553]

A mouse is considered that out of the options listed.

5 0
3 years ago
Read 2 more answers
Select the correct answer from the drop-down menu.
AnnyKZ [126]

you can right click the target cell or cells and then select the keys to paste the copled data.

3 0
3 years ago
Read 2 more answers
Use the variables k and total to write a while loop that computes the sum of the squares of the first 50 counting numbers, and a
Vikentia [17]

Answer:

total=0

def calcsumnumsquare(k,total):

   while k>=1:

       total+=int(k)*int(k)

       k-=1

   return total

print(calcsumnumsquare(4,0))

Explanation:

The program required is written above. It uses only two variables k and total as mentioned in the question. And the total is initially set to 9, and then its value is incremented by the square of each k during each loop established by while loop. And finally, when k=1, the output is returned. And we have printed the return value using print.

6 0
3 years ago
Other questions:
  • What are the example of dedicated computers?
    5·1 answer
  • You can use the_______key if your cursor is at the end of the word. Use the______key if you place the cursor on the left side of
    11·1 answer
  • Ask the user to input an integer. Print out the next three consecutive numbers.
    12·1 answer
  • Justify any FOUR significant factors to remember when installing your motherboard
    7·1 answer
  • Please tell fast plzzzzzzz​
    11·1 answer
  • The sun can be an excellent source of natural light.<br> True.<br> False.
    8·2 answers
  • Consider the following import statement in Python, where statsmodels module is called in order to use the proportions_ztest meth
    10·1 answer
  • Which one of these is not an area of AI? Computer vision/image, recognition Voice recognition, Robotics, Web design
    11·2 answers
  • Explain the concept of conditional formatting​
    9·1 answer
  • What is the distance from the end of the pin to the center of the hole?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!