Open in app

Sign in

Write

Sign in

Pete Thomasberger
Pete Thomasberger

18 Followers

Home

About

Aug 8, 2021

Animating Movement in Unity3D

Objective: Add movement animations to the Player when pressing either the left or right arrows. Step 1: In Unity, with the Player GameObject selected in the Hierarchy window, create an animation file for the left turn and another animation file for the right turn using the chopped-up Sprite animation images…

Unity

4 min read

Animating Movement in Unity3D
Animating Movement in Unity3D
Unity

4 min read


Aug 6, 2021

Working with Weighted Tables in Unity3D

Objective: Create a balanced spawn system for the power-ups using a weighted table where more common power-ups, like ammo and health, spawn more frequently, and rare power-ups, like the Laser Beam, spawn more infrequently. Step 1: In the SpawnManager script, create a private int array called _table and set a…

Unity

4 min read

Working with Weighted Tables in Unity3D
Working with Weighted Tables in Unity3D
Unity

4 min read


Aug 1, 2021

Class Inheritance in Unity3D

Objective: Create two custom classes and have one custom class inherit the properties of the other custom class. Step 1: In Unity, within the Hierarchy window, create an Empty GameObject named Item_Database. In the Project window, create three C# Scripts called Item, Weapon, and ItemDatabase. …

Unity

2 min read

Class Inheritance in Unity3D
Class Inheritance in Unity3D
Unity

2 min read


Jul 30, 2021

Using Custom Classes within Databases in Unity3D

Objective: Create a custom Class for defining information about 3 customers to use within a customer database. Step 1: In Unity, create an Empty GameObject in the Hierarchy window called Customer_Database. Then create a C# Script called CustomerDatabase and drag it onto the Customer_Database GameObject. …

Unity

3 min read

Using Custom Classes within Databases in Unity3D
Using Custom Classes within Databases in Unity3D
Unity

3 min read


Jul 29, 2021

Working with Return Methods and Arrays in Unity3D

Objective: Create 5 positions that a GameObject will be randomly set to at the start of the game. Step 1: Within Unity, create a Cube 3D GameObject in the Hierarchy window and rename it to Player. …

Unity

3 min read

Working with Return Methods and Arrays in Unity3D
Working with Return Methods and Arrays in Unity3D
Unity

3 min read


Jul 26, 2021

Working with Return Methods in Unity3D

Objective: When pressing the space bar, damage the Player by a random amount and, using a Return Method, check if the Player has died. If the Player has died, print out “The Player has died!”, do not let the Player’s health drop below 0, and prevent that the space bar…

Unity

3 min read

Working with Return Methods in Unity3D
Working with Return Methods in Unity3D
Unity

3 min read


Jul 24, 2021

Working With Method Parameters in Unity3D

Objective: Change the color of a cube to red when the Space key is pressed by passing parameters from one method to another method. Step 1: In Unity, create a 3D Cube in the Hierarchy window.

Unity

3 min read

Working With Method Parameters in Unity3D
Working With Method Parameters in Unity3D
Unity

3 min read


Jul 19, 2021

Fixing A GameObject Detection Bug in Unity3D

Objective: Fix a bug that causes the Enemy to detect and evade laser shots after a collision that triggers the explosion animation. Step 1: In the Enemy script, within the DodgeLeft() coroutine, add to the while loop condition that both _collider1 and _collider2 must be enabled for the evade movement to take place.

Unity

2 min read

Fixing A GameObject Detection Bug in Unity3D
Fixing A GameObject Detection Bug in Unity3D
Unity

2 min read


Jul 17, 2021

Using Lerp-Over-Time to Evade Shots in Unity3D

Objective: When the Enemy detects a laser, depending on which Raycast picks up the detection, the Enemy will move to the left or right to evade the laser. Step 1: Create an IEnumerator method called DodgeLeft(). Within this method create a Vector2 variable called _currentPos and have it equal to…

Unity

2 min read

Using Lerp-Over-Time to Evade Shots in Unity3D
Using Lerp-Over-Time to Evade Shots in Unity3D
Unity

2 min read


Jul 16, 2021

Using Raycast To Detect GameObjects in Unity3D

Objective: Enemies that move straight down the Y-axis can detect laser shots made by the player. Step 1: In Unity, select the Laser Prefab in the Project window and create a new Layer in the Inspector window called Laser.

Unity

3 min read

Using Raycast To Detect GameObjects in Unity3D
Using Raycast To Detect GameObjects in Unity3D
Unity

3 min read

Pete Thomasberger

Pete Thomasberger

18 Followers

Unity Developer

Following
  • Jared Amlin

    Jared Amlin

  • Games Woods

    Games Woods

  • Bill Rislov

    Bill Rislov

  • Calum Slee

    Calum Slee

  • Micha Davis

    Micha Davis

See all (10)

Help

Status

About

Careers

Blog

Privacy

Terms

Text to speech

Teams