> For the complete documentation index, see [llms.txt](https://infinitypbr.gitbook.io/magic-pig-games/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infinitypbr.gitbook.io/magic-pig-games/projectile-factory/3rd-party-particle-integrations-16/forge3d-1/sci-fi-effects.md).

# Sci-Fi Effects

{% embed url="<https://www.youtube.com/watch?v=DB0m8z-bkWY>" %}

[**Sci-Fi Effects**](https://assetstore.unity.com/packages/vfx/particles/sci-fi-effects-20416?aid=1100lxWw) contains great particles with really wonderful sounds, and the ability to construct sweet turrets, or just use the ones ready to go in the pack.

## Install the Integration

Navigate to the **"Asset Store Integrations"** folder, and extract the .unitypackage for [**Sci-Fi Effects**](https://assetstore.unity.com/packages/vfx/particles/sci-fi-effects-20416?aid=1100lxWw). This will install the prefabs and any other required assets.&#x20;

If you have [**Sci-Fi Effects**](https://assetstore.unity.com/packages/vfx/particles/sci-fi-effects-20416?aid=1100lxWw) already installed, the Projectiles should work right away. There is also a demo scene ready to go for you to test and see them in action.

<figure><img src="/files/u2kftme4KagQK9F4VDvw" alt=""><figcaption></figcaption></figure>

Remember the [**Projectile Spawner**](/magic-pig-games/projectile-factory/projectile-factory-documentation/projectile-spawner.md) has an option for multiple spawn points -- this is how you'll enable multple barrels on a single turret. You can even customize the order by making your own **Spawn Point Manager**.

## New Scripts; Other Changes

I re-did all of the logic for this package. The original scripts are not easy to use, non-modular, and can't be hooked into. But, that's probalby why you're using Projectile Power, because you want modularity and flexibility!

In the demo scene there is a *Demo Turret*. Lets break down what this has on it.

<figure><img src="/files/CQQ5lyWfsZuANEBtLcyY" alt=""><figcaption></figcaption></figure>

The object has the Projectile Spawner on it, and the Projectile Demo Actor. We also have a **Look At Mouse Position In 3D World** component. This is a more consice script that has nearly the same effect as the script in the [**Sci-Fi Effects**](https://assetstore.unity.com/packages/vfx/particles/sci-fi-effects-20416?aid=1100lxWw) demo scene. This is what moves the turret when the mouse moves.

<figure><img src="/files/8TTBszR0EUNLuWHVBv0t" alt=""><figcaption></figcaption></figure>

Both of these objcts -- "Swivel" rotates horizontally, "Mount" vertically -- have a Simple Look At component, turned off. If you turn both of these on, and turn off the compoent on the parent object, then the turret will look at the target automatically, rotating as the target moves.

## Projectile Changes

Now that the particles are in Projectile Power, they're super flexible. To show an example of this, the Plasma Gun effect is set up a bit different.

<figure><img src="/files/VgI2ZzJMIV3mvDIK0Xm7" alt=""><figcaption></figcaption></figure>

The [**Projectile Data**](/magic-pig-games/projectile-factory/projectile-factory-documentation/projectile/projectile-data.md) is a slower speed, and the [**Movement Behavior**](broken://pages/yB8jRX39rGIViE95JpAZ) has a behavior that will make the particle follow and move toward the target. If you want it to be fast, change the Projectile Data object. If you want it to move straight forward, change the Movement Behavior. Entirely up to you!

### Hit Detection

Some projectiles will have a `Projectile Raycast Hit Detector` component. If they're moving very fast, a collision or trigger may not occur -- the collider may move entirely past another collider between frames. This component will use a raycast forward to check for collisions. With slow moving projectiles, it's obvious that they disappear early, so this works best for fast moving projectiles.

## Other Particles

There are "impact" and "muzzle" particles as well. The "Muzzle" particles are spawned at launch, with a **Spawn Behavior Modification** on the Projectiles.

### Projectile Power Destroy

These particles have a **Projectile Power Destroy** script on them, so that they can be destroyed or sent to the object pool, if you're using it.

### Controlling Lights

The light objects found in the impact and "muzzle" (launch) particles, which are instantiated when a projectile is fired, often have lights. These will have a new `Fade Light` component on them, which will fade the light quickly.

### Quads & other objects

The `Projectile Power Destroy` component will have the quads on these particles listed in the Objects To Destroy Immediately list, often with a very short delay, so they appear to flash.

### Playing Audio

These particles also have a `Play Audio Clip On Awake` componet, which is where the "fire" and "impact" sounds are coming from.
