- Home /
Recreating word of power in unity 3d.
i am trying to use unity's particle system to create an explosive like effect for a magic spell from lord of the rings battle for middle earth.
below is the the link for the spell :
http://www.youtube.com/watch?v=flCV1z01G78
i know the basics of the particle system so my question is this.
1) how do i replicate the shape of that shock wave.
2) the first part of the spell gandalf gathers power Then it's blown in to a shockwave. does that mean it's nested particle systems?
Answer by Dracorat · Jul 16, 2014 at 04:43 PM
OK - so looking at the video, my best estimate of what is happening:
When the spell is cast, a plane is added to the world. (A 2D object aligned with the ground but slightly above it)
The plane has an animated texture that was manually rendered by the game artists ahead of time. It has the pulse-inward and pulse-outward animation all done ahead of time.
At the moment the pulse outward happens, the game adds a number of box colliders (let's say 8) oriented roughly in a circle then scales them outward to match the explosion animation of the spell. The collider has a flag that causes it to interact only with hostile mobiles.
The physics engine takes care of the knock up and out as a result. As each is hit, code will apply damage based.
The texture for the spell looks good due to post-effects, probably HDR but possibly just a custom shader. I doubt a single particle effect is actually used.
Answer by shadowkiller0071 · Jul 16, 2014 at 04:37 PM
I know how to do number one. Put a flat (Y: 0 or something small) sphere centred on the player inside of an empty object (call the sphere wordPower).
Next create an animation (ctrl+6) based on the sphere. Add all transform curves and simply scale it to look the same as the one in the video (also give it a blue texture). Go to the sphere and click add component, add an animation and drag this animation in to it as soon as you are done this. Repeat the process again (Do not make a new sphere, simply rescale this one to fit the video in the first frame of the animation) with the next shape (scale it appropriately). Which I see to be a ROUND sphere turning flat and sweeping over enemies add this to the animation component as well.
For both of these turn off colliders until you know how to impact the enemies with it (I can't help with that :C). Now, one of them should be going in during the animation and one out (along with a y scale change in order to become flat), along with a blue texture. Now it is time to make a script to use activate these upon your button press.
Put the following script onto the empty object and drag the sphere from the hiearchy into the variable slot for wordPower in the components of the empty object.
var wordPower : Transform;
if (Input.GetButtonDown("Fire1")) //This makes it so it activates upon pressing LMB. You can change that if you want
{
wordPower.animation.Play("animationName")
yield WaitForSeconds(3.5) //3.5 is the second length of animation number one, so find that out and set it
wordPower.animation.Play("animationName2") //in both of these simply type the name of the animations in order
//i also recommend using this script with any other scripts for this action
}
Answer by Josh Naylor · Jul 16, 2014 at 04:26 PM
In the video example it is many particle effects together that makes it look so awesome. This pack (https://www.assetstore.unity3d.com/en/#!/content/11158) is free on the asset store and if you put some of them together may give you the desired effect.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Making a bubble level (not a game but work tool) 1 Answer
How to add a variable to a prebuilt class? 1 Answer
Trouble Adjusting Stats (MP After Casting A Spell) 2 Answers