Asset Store Link
© 2017 Justin Garza
PLEASE LEAVE A REVIEW OR RATE THE PACKAGE IF YOU FIND IT USEFUL! Enjoy! :)
Questions, suggestions, help needed?
Contact me at:
Email: jgarza9788@gmail.com
Cell: 1-818-251-0647
Contact Info: justingarza.info/contact
Alternate Website: jgarza9788 - UnityPortfolio
Displays an energy shield/force field effects when impacted by projectiles, or raycasts.
- Easily customizable effect. Size, Color, * Speed, etc.
- Renders on simple and complex meshes.
- Simultaneous impact points support.
- Support for culling and non-culling.
- Distortion and Color!
- Unity Free friendly.
- Fully commented C# code.
- Awesome demos!
You are free to add this asset to any game you’d like
However:
please put my name in the credits, or in the special thanks section. :)
please do not re-distribute.
The Energy Shield is a Shader, with an optional C# Script. The C# Script manages the collision effects that can be displayed on the shield.
Description:
This Script Creates/Updates the shader to render the energy shield effects, and stores the presets for the energy shield effects.
CollisionTags:
Object Tags used to detect if a collision has occured.
Presets:
Groups of values that will be used to determine how the energy shield effects will render.
RadiusOverTime:
The radius of the effect over time.
The value should be between 0.5 and 10.0
FadePowerOverTime:
Controls how the circle fades on both sides of the radius.
The value should be between 0.5 and 15.0
inThicknessOverTime:
Controls the thickness of the effect on the inside of the radius.
The value should be between 0.05 and 15.0
outThicknessOverTime:
Controls the thickness of the effect on the outside of the radius.
The value should be between 0.05 and 15.0
ColorOverTime:
This controls the color of the effect over time.
Should end with full transparency.
The Other scripts are basically just used for the Demos.
AlwaysFace.cs:
Turns the gameObject to face the Target.
DestroyAfter.cs:
Destroys an object after a set period of time.
Used in the projectiles.
Rotate.cs:
Used to rotate the camera.
ShootOnClick.cs: Controls the shooting of rays and projectiles.
ToggleButton,cs: controls the opening/closeing of the settings
There are two shaders provided in this asset.
EnergyShield.shader is the full energy shield you see in the demo. with features like color tinting, distortion, and the collision effects.
EnergyShield_CEO.shader is the Collision Effects Only.
There is a set limitation to how many properties a shader can have. This means there is a limit of 10 effects that should occur on the same shield at the same time, since most effects do not last long i do not expect for this to be a problem with most users.
One reason why a collision is not being detected is because the shield is a child of an object with a rigidbody component. I'm calling this the "Rigidbody_ShieldChild" Problem. The solution to this problem is to have a script on the parent object that will detect the collision (Aka use the OnCollisionEnter method) and trigger the shield effect to occur.