There is some things I’m not sure when I try to make such effects in unity,
from the image above, We learn that there is a glowing aura around the tower. Can I make this effect by add a semi-transparent matirial to a sphere ?
from the image above, We learn that there are some irregular light beams vibrating. I have no idea how to make such effect, can anyone give me some suggestion ?
from the image above, We learn that there is a straight line laser between the tower and the enemy ? Can I make this effect by line render ?
Any suggesstion or help will be appricated. Thanks.
I would suggest using sprites. I would try writing a script to vary the opacity of the beam sprite, (as well as transform its length and angle).
For the aura, I would use multiple overlapping sprites that vary in opacity, angle, and size at a random factor.
Some or all of this may also be possible using Particles, but I’ve not used them enough to know for certain.
A single LineRenderer should be fine for the line. I would actually experiment with a particle system for both origin and impact flares. The default particle system with a tiny bit of random velocity and velocity-stretched particles should do the trick.
You can do all of this without virtually any scripts, just use a particle system and a trail renderer. You will need a ridiculously simply script to instaniate aa projectile, rotate it to the target’s direction, and move it at a very high speed.
The projectile should have a trail renderer on it, giving the laser effect.
As for the glow, do what Satoh said, but with the “irregular beams” also use a particle system, with a simple 4 way starburst texture, and within the particle system set the starburst’s to spawn at random rotations along the x axis, and make a small size difference between max and min particle scales. Thats it, you will now have a laser blaster, which can be put anywhere. However, this solution only allows bursts of laser fire, not a continuous, tracking beam. For that you would use a line renderer like Daniel said, which would require some scripting, but not much. I would be willing to create this effect for you (with both tracking and burst laser beams) for the price of my time, PM me if you are interested
I have been searching around and I know the answer is simple. I have been learning development, and I’m working on a project. My question is this - How do I properly instantiate a particle system at the raycasthit.point with a constant laser and it not instantiate every frame to follow the laser? I am using the line renderer and have a constant green laser as a weapon. I do not want to instantiate the particle system every frame of the game which it’s doing because of my constant raycasting. I would like to instantiate only one particle system at the end of the laser at the hit.point and have that particle system follow the laser at it moves along the surface of the hit collider. Then once the Mouse 1 is released, the laser and particle system are destroyed/disabled. Any help is appreciated.
Setup:
Raycast on Mouse 1 down
LineRenderer for laser
I have found the resolution to this if anyone is reading this. There was a small snip of code I found out there on the web. This achieves what I needed. If you are casting a constant Raycast with the RaycastHit.point data updating every frame, and you want to only instantiate one “effect” or “object” at the RaycastHit.point, as well as, that object to follow the RaycastHit.point as you move the raycast around the scene, then do this.