Unity 3D Game Development Math

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

Familiarizing with Vectors and render pipelines in Unity 3D will eventually become intuitive, similar to working in a 2D environment.

True (A)

Materials primarily dictate where and how far something is related to its zero point in the game environment.

False (B)

Vertices are used for texturing, light bouncing, depth and many more properties on an object.

False (B)

Vector2D coordinates focus on two coordinates only, both X and Z.

<p>False (B)</p> Signup and view all the answers

If a Vector3D focuses on three coordinates, the coordinates represent the X, Y for horizontal and vertical position and W represents the depth of an object.

<p>False (B)</p> Signup and view all the answers

Vector magnitude is the length of a vector's direction away from 1, using the Pythagorean theorem.

<p>False (B)</p> Signup and view all the answers

Normalization in Unity involves setting a object's magnitude to 0 to find its exact direction.

<p>False (B)</p> Signup and view all the answers

In Unity, directions are pointed towards using angles rather than vectors.

<p>False (B)</p> Signup and view all the answers

Vector methods calculate specific problems to lengthen time regarding positioning, distance, and direction within Unity.

<p>False (B)</p> Signup and view all the answers

The .Distance(vectorA, vectorB) method can be used to calculate which target is closer for an enemy to attack, or for an NPC choosing the closest object to interact with.

<p>True (A)</p> Signup and view all the answers

The .Lerp(posA, posB, progress) method only has two parameters: a starting and an ending position.

<p>False (B)</p> Signup and view all the answers

The .MoveTowards(posA, posB, distance) method is used if you want a smooth movement, but rather a more static increase.

<p>False (B)</p> Signup and view all the answers

The reflect method is typically used in objects that would bounce against walls, by sending three variables.

<p>False (B)</p> Signup and view all the answers

.Dot(VectorA, VectorB) returns a value between -2 and 2; being in the middle when two vectors are perpendicular to one another.

<p>False (B)</p> Signup and view all the answers

The cross method can be used when you want to shrink something to a certain angle.

<p>False (B)</p> Signup and view all the answers

Flashcards

Vectors

Primary tools that tell the compiler where and how far something is related to its zero point.

Vertices

Dots around the game world that return fixed X, Y, and Z values.

Material

Used for texture, light bouncing, depth, and enriching the look of an object.

Vector2D

Focuses only on two coordinates: X and Y.

Signup and view all the flashcards

Vector3D

Focuses on three coordinates (X, Y, and Z) for horizontal position, vertical position and depth.

Signup and view all the flashcards

Vector Magnitude

The length of a Vector direction away from 0 using Pythagoras' theorem.

Signup and view all the flashcards

Normalization

A common process in math and Unity that points direction by where the vectors are pointing, focusing on the X, Y, and Z axes.

Signup and view all the flashcards

Vector Methods

Commands that shorten the time to calculate specific problems in Unity regarding positioning, distance, and direction.

Signup and view all the flashcards

Distance (Vector Method)

Pinpoints the position of gameObjects, finding how far two vectors are by measuring the magnitude in between two vertices.

Signup and view all the flashcards

Lerp

A vector method that expects a starting position (posA), and end position (posB) and a float to specify where in between those two vectors the return vector is located

Signup and view all the flashcards

MoveTowards

a vector method that moves in constant speed, by accepting the third value as the rate of increase per frame

Signup and view all the flashcards

Reflect

A vector method that is used in objects that would bounce against walls, for example games like peggle or zuma.

Signup and view all the flashcards

Dot

Returns a value between -1 to 1 depending on where the two vector directions are pointing.

Signup and view all the flashcards

Cross

Returns the vector perpendicular to two provided vectors.

Signup and view all the flashcards

Shaders

Powerful tools used to create textures with base color, metallic, roughness, normal, and ambient occlusions.

Signup and view all the flashcards

Study Notes

  • This study guide covers math and 3D concepts for advanced game development using Unity, including vectors, 3D rendering, and related math methods.

Introduction

  • Unity 3D may appear complex initially, but vector and render pipeline familiarity is key to becoming as comfortable as working in 2D.

Key Vocabulary

  • Vectors are primary tools that inform the compiler of an object's position relative to the zero point.
  • Materials dictate an object's texture, light bouncing, and depth.
  • Vertices are reference points in the game world that provide fixed X, Y, and Z values.

Vector Basics

  • The course will cover both 3D and 2D vectors.

Two Types of Vectors

  • Vector2D focuses solely on two coordinates: X and Y.
  • Vector3D uses three coordinates, X and Y for horizontal and vertical position, and Z for object depth.

Magnitude

  • Vector Magnitude refers to the length of a Vector direction away from 0, calculated using the Pythagorean theorem.

Pythagoras Theorem

  • Magnitude = √X2+Y2
  • Magnitude is used to determine the distance from a specific location.
  • Weapons at range of 5 units away, by calculating it we would come out as 7.071.

Normalization in Math

  • Unity uses vector direction to indicate direction instead of angles.
  • Normalization is used to obtain the exact direction by setting the magnitude to 1 and focusing on the X, Y, and Z axes.

Vector Methods

  • Vector methods speed up calculations for positioning, distance, and direction in Unity.

Distance

  • Vectors pinpoint the position of gameObjects.
  • Distance between two vectors is calculated as the magnitude between two vertices.
  • .Distance(vectorA, vectorB)
  • Vector distance can be used to identify the closest target for an enemy or an NPC.

LERP & Move Towards

  • .Lerp(posA, posB, progress) requires three parameters.
  • The first vector indicates the starting position.
  • The second vector indicates the ending position.
  • The third parameter is a float between 0 and 1, specifying where the return vector is located between those two vectors.
  • This can be used for player movement or moving platforms.
  • MoveTowards moves at a constant speed, with the third value determining the rate of increase per frame.
  • .MoveTowards(posA, posB, distance) should be used for a more static increase instead of smooth movements.

Reflect

  • Reflect is typically used for objects that bounce against walls.
  • It takes two variables: the travel direction of the moving object, and the normal of the reflecting surface indicating the direction to reflect the ball toward.
  • Returns the vector pointing to the object's new direction.

Dot

  • The dot function returns a value between -1 and 1.
  • 0 indicates the vectors are perpendicular.
  • The value depends on the directions of the two vectors.
  • .Dot(VectorA, VectorB) can be used to check if a plane is pointing up or down to increase or decrease drag.

Cross Method

  • .Cross(dirA, dirB) returns the vector perpendicular to two provided vectors.
  • The cross method is used when you want to rotate something to a certain angle, cross helps on knowing which way to turn an object to achieve the direction it is trying to get by rotating the object.

3D Rendering

  • Fundamentals of 3D Development

Unity 3D Graphics

  • Unity 3D offers easy to understand and use 3D game development processes.
  • Importing models is easier than ever, with most formats being compatible.

Shaders

  • Shaders create textures using base color, metallic properties, roughness, normal, and ambient occlusions.

Optimization

  • Unity uses Level of Detail (LOD) to utilize textures shown at a distance.
  • Lower poly models reduce stress on the computer.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Untitled
13 questions

Untitled

AmiableWolf avatar
AmiableWolf
Mixed-Dimension UI Design for Unity Games
4 questions
Unity 3D Environment Creation
36 questions
Advanced Game Design Quiz
34 questions
Use Quizgecko on...
Browser
Browser