Tutorial #9: Custom Bullets

Our kit comes with 1 bullet template and 3 pre-configured bullet prefabs (yellow bullet, blue alien bullet, and flamethrower).

Creating new bullets is easy and should take only about 5 minutes if you already have your bullet model ready.

The bullet prefab holds the following information:

The bullet prefab does NOT hold any weapon speed or ammo amount. That is determined by the bot’s Attack FSM.


STEP 1: Drag the Projectile Template prefab into your scene for modification.

STEP 2: Drag a raw 3d model into the prefab, as a child. In the screenshot below, we used a simple cube with colliders removed.

STEP 3: Tweak the FSM parameters.  If you want constant, non-random damage, simply set both DamageMax and DamageMin to the same number.  hitFX is the particle effect to spawn when hitting another bot. hitFXMisc is the effect to spawn when hitting a structure/wall tagged as “Building”

STEP 4: Drag the new prefab back into the Assets folder for use as a bullet in your bots!



You can find example pre-configured bullets in this folder: