Overview & Quickstart
Extensible projectile system for quick projectile creation
Last updated
Was this helpful?
Extensible projectile system for quick projectile creation
Last updated
Was this helpful?
solves two common problems Unity developers face when creating projectiles: Creation & Runtime Use.
Creating projectiles is simple at first, but often developers find that they want new projecitles that do things...differently from the others. Firing one bullet, simple enough. But what about a machine gun? Or a bullet with some built-in inaccuracy? Or an arrow? Or a bullet hell mothership with hundreds of projectiles in a pattern?
In Projectile Power, each Projectile is made up of Behaviors which determine how the projectile spawns, moves, collides, and more. In the exampels below, we get two Projectiles with slightly different .
These behaviors can be mixed and matched, and each behavior is a Scriptable Object, so you can have any number with various options set how you'd like.
And if you're like me, you have tons of killer particle packages from the Asset Store, and you want to use them in your project. Many find that each particle package can set up wildly different from the others. Sometimes they're set up in a way that requires a large amount of manual work to actually use them.
At the core, each behavior starts as a very simple script. You can create new classes which override key methods in order to create custom behaviors, or add additional functionality that better fits your project.
You can even sell what you create on the Asset Store 🤑
Simple methods like SpawnProjectile()
, NextProjectile()
, StopProjectile()
make it simple to hook up your player and NPC controllers to Projectile Power.
In the demo scene, we use an observer to cause damage to the target when a projectile successfully hits it. This is a super common use case, and allows you to easily connect your game logic with the Projectile Power projectiles.
And even then, they all work slightly differently. With Projectile Factory, your projectiles become uniform, no matter what particle package you're using, so you can quickly mix and match in your game. We also include many that have projectiles ready to go for instant use.
Projectile Power comes with many ready to go, and a demo scene showcasing very common projectiles found in many games. If you want something more custom, you can easily create it.
Objects that spawn projectiles are called... ! With a clean custom Inspector, it's easy to add Behaviors and make new Projectiles for your game.
Once launched projectiles each have a class -- also extensible. Other scripts can subscribe to event based notifications such as Launch()
, OnCollisionEnter()
, OnDisable()
and more. In fact, this is how the various behaviors on the projectile are notified of events, including UnityEvents
in the Inspector.
In addition to the behaviors, you can also create , which are similar to Behaviors, but do only what you code them to do.
Dig into the demo scene and documentation, and if you have any questions, come ask on the !