Power Up System in Unity — Part 1

Creating Triple Shot Prefab

Triple Shot Prefab Behavior

  1. Create a variable of bool ‘isTripleShotActive’ as ‘false’ to start with.

Create TripleShot Power-Up that can be collected

  • In Circle Collider2D — check ‘Is Trigger’ under Collider! (We will need this to use OnTriggerEnter() Method)
  • In Rigidbody2D — Gravity Scale to 0, so that we don’t get affected by gravity.

PowerUp Script

  • move it down at speed of 3, then destroy it when it is at the bottom of the screen.
  • When it collided with the player (by looking for a tag “Player”), we will enable the bool variable ‘isTripleShotActive’ (that we created above) to true. Then, destroy it.




XR Unity Developer / Designer / Architect

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Equipment for Simultaneous Interpretation | Chang-Castillo and Associates

OpenShift: A new era Kubenetes

Midterm Prop

Configuring Nginx Files and Directories

How to deploy a three-tier architecture in AWS using Terraform?

Boot camp- TIA

HEALTHCARE: 1 Walkthrough (Vulnhub)

Sharding Clio’s Database, Part 1

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Du Young Yoon

Du Young Yoon

XR Unity Developer / Designer / Architect

More from Medium

How to fetch data from API in Unity

2D Game Development: Colliding with Colliders

C# scripting in Unity — Day 01

P6: Creating a Gritty Office Den