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
Which best describes inserting a table using the Table Gallery
balandron [24]
The table gallery is to help you create the table.
4 0
3 years ago
Read 2 more answers
Write Java program to allow the user to input the amount of deposit, yearly interest rate (percentage), and income tax(percentag
Vedmedyk [2.9K]

Answer:

import java.util.Scanner;

public class num12 {

   public static void main(String[] args) {

       Scanner scr = new Scanner(System.in);

       System.out.println("Enter a Deposit Amount");

       double amt = scr.nextDouble();

       System.out.println("Income tax in percentage");

       double incomeTaxRate = scr.nextDouble()/100;

       System.out.println("Yearly interest rate:");

       double rate = scr.nextDouble();

       double intRate = rate/100;

       double interest = (amt*intRate)-(amt*incomeTaxRate);

       System.out.println("The Interest on "+amt+" at "+rate+"% after one year is "+interest);

   }

}

Explanation:

Find the sample output attached

Java's Scanner class is used to prompt and receive values for deposit amount, income tax rate and interest rate

The yearly interest is calculate by interest = (amt*intRate)-(amt*incomeTaxRate);

3 0
3 years ago
How can users create a shortcut to favorite websites and store them in their browser?
8090 [49]
I know the first one is A) Bookmark sites and I think the second one is B) Cross-platform capability. 
8 0
3 years ago
Read 2 more answers
Who is affected by electronuc theft of a song ?
Sonbull [250]
I would have to say the artist.
simply because the artist or publisher does not receive any income on their product. 
7 0
3 years ago
Read 2 more answers
What types of issues can you most likely resolve by knowing how to access and use the control Panel?
andrezito [222]
Network issues; screen resolution and volume issues
8 0
3 years ago
Other questions:
  • Your company sent several staff members for UML training. An outside vendor provided the training. Everyone who attended the tra
    5·1 answer
  • The unique global address for a web page or other resource on the internet is called the ________.
    7·1 answer
  • ‘Bottom of the pyramid’ innovation refers to ancient Egyptian approaches to new product development – true or false?
    8·1 answer
  • A user reports his or her computer is slow to boot. You check the boot order and determine that the computer is checking the C d
    12·1 answer
  • A large software development company employs 100 computer programmers. Of them, 45 areproficient in Java, 30 in C, 20 in Python,
    9·1 answer
  • Why is the ketboard calledQWERTY
    11·2 answers
  • There are many modes of remote visual communication. which is the most common mode
    5·1 answer
  • Assume the system with 256B memory and 64B cache and the block size of 16 bytes. I.e., there are 4 blocks in the cache.
    12·1 answer
  • How do you get lugia in pokemon alpha saphire
    6·1 answer
  • TCP and the User Datagram Protocol (UDP) provide _________ between processes on any two of those hosts. A. address translation B
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!