Unity | Project | FPS Tutorial | 1. Start

2
Creating Cubs | Extracting Textures\

 

3
Adding Texture | Material Created
  • when adding texture to game objects, materials from the textures are created automatically
4
Creating Material First
5
Adding Texture to Material Created Before
6
Texture | Tiling
7-0
RigidBody | Transform.rotation.z 45 degree
7-1
Falling Cube
  • when the angle is too good, the physics is not working perfectly
8-0
Transform.Rotation.z 20 degree
8-1
Physics Working
9
Snap Setting
1014.png
Snap Setting
  • with Control key pressed, we can move Game Objects by specific units
11
Creating Wall | Texture | Tiling
12-0
Creating Set of Wall with two different textures
12-1
Adding First Person Player | Physics Working
13-0
Adding Gun
13-1
Walking with Gun

 

UNITY TUTORIAL | PROJECT | SPACE SHOOTER |9. Creating Hazards

UNITY TUTORIAL | PROJECT | SPACE SHOOTER |9. Creating Hazards

2
Adding Asteroid as Hazard

 

3
Adding “RigidBody” and “Capsule Collider”

 

4
adding a script to give Tumbling
5
setting tumbling speed with a public variable
6
RigidBody.AngularVelocity | Random.insideUnitSphere
ezgif.com-video-to-gif
tumbling Asteroid but with Angular Drag
7
setting Angular Drag to 0
ezgif.com-video-to-gif-2
Asteroid tumbling without Angular Drag
8
adding a script to make destruction
9
OntriggerEnter to detect any collision | Destroy()
  • Destroy(other) – only removing the collider
  • Destroy(other.gameObject) – removing only the gameObject with Collider “other”
ezgif.com-video-to-gif-3
Bug | something is triggering “Destroy()” function
10
Debug.Log (other.name)
ezgif.com-video-to-gif-4
Debugging 1 | finding the cause
11
Debugging 2 | finding the cause
12
Debugging 3 | Tagging “Boundary”
13
Debugging 4 | detecting any gameObject with a tag “Bounadry” | return
  • Return ends the execution of a function and hands the control back the function that called it (maybe Unity itself)
  •  Return ends OntriggerEnter Function and returns the control back to Unity’s Game Loop
  • As a result, if the object’s tag is “Boundary”, we will never reach or execute “Destroy” function
ezgif.com-video-to-gif-5
Debugging 6 | Solved
ezgif.com-video-to-gif-6
Asteroid destroyed by Laser

UNITY TUTORIAL | PROJECT | SPACE SHOOTER |2. The Player Game Object

UNITY TUTORIAL | PROJECT | SPACE SHOOTER |2. The Player Game Object

2
Adding Player GameObject
3
Resetting the position of “Player” into (0, 0, 0)
4
Transform.Position set to (0, 0, 0)
56.png
RigidBody Added | Gravity Unactivated
6
Capsule Collider Added
ezgif.com-video-to-gif
Changing Collider Size
8
Changing the direction of Collider into Z-Axis for configuration
9
Changing the Radius and Height of Collider
10
Adding “Mesh Collider” | only one collider should be added
11
“Mesh Renderer” off to see “Mesh Collider”
13
Simplified “Mesh” added to “Mesh Collider”
14
“Particle” added as Child GameObject of  “Player”
ezgif.com-video-to-gif 복사본
“Particle” effect

UNITY TUTORIAL | PHYSICS | 3D Physics | RigidBodies

UNITY TUTORIAL

PHYSICS | 3D Physics | RigidBodies

2.png
GameObject without RigidBody
3
GameObject without RigidBody
4
GameObject with RigidBody
ezgif.com-video-to-gif.gif
GameObject Falling under Gravity because of RigidBody
5
Project Setting | Physics
6
Physics Manager | Direction of Gravity
7
Changing the Direction of Gravity
ezgif.com-video-to-gif
GameObject Falling under Gravity in a different direction
9
Use Gravity | Is Kinematic
10
Board – Gravity On
11
Ball – Gravity On

1.2 gravity.gif

12
Board – Gravity
13
Ball – Gravity On

2. 1 gravity

14
Board Kinematic On
15
Ball – Gravity On

3. kinematic

16

17
To move Kinematic GameObject
ezgif.com-video-to-gif
Kinematic GameObject

the object still interacts with the others but remains a rigidbody,

so is constantly informing the physics engine of its location

and not forcing the physics engine to re-evaluate the entire scene.

18
Interpolate | ExtraPolate
19
Collision Detection
20
Constraints of Position and Rotation

 

ezgif.com-video-to-gif (1)
No Constraint

 

ezgif.com-video-to-gif
Rotation Constraint

 

UNITY TUTORIAL | PHYSICS | 3D Physics | Colliders as Trigger

UNITY TUTORIAL

PHYSICS | 3D Physics | Colliders as Trigger

 

collider-as-trigger1.png
Trigger | BoxCollider | Is Trigger

 

trigger1
Is Trigger
322.png
Trigger | BoxCollider | CollisionDetection script
4
OnTriggerEnter() | OnTriggerStay() | OnTriggerExit()
5
Falling Object | RigidBody
trigger2
OnTriggerEnter() | OnTriggerStay() | OnTriggerExit()
6
Hovering​ Script
7
Collider.attachedRigidBody | AddForce() | ForceMode.Acceleration()
hovering1
Hovering Simple
hovering2
Hovering Force Changing
8
Freeze Position
hovering3
Hovering with FallingObject Frozen