Hi,
I have an object, Say a magic missile. When the object reaches its terminal velocity in the Y direction it should spawn an additional effect to indicate it is going as fast as it can.
Bonus points if I can blend this effect.
Cheers!
Hi,
I have an object, Say a magic missile. When the object reaches its terminal velocity in the Y direction it should spawn an additional effect to indicate it is going as fast as it can.
Bonus points if I can blend this effect.
Cheers!
When you say blend, you mean the effect starts to become visible BEFORE it reaches terminal velocity, but the effect reaches its maximum strength once it is at maximum speed?
The approach you should take depends a little on whether you’re using a mesh, a particle emitter, or something else to create the effect. Which way are you going to do it? Maybe a combination of those?
You CAN parameterize aspects of the particle effects and update the values in real-time via blueprints. Then it is nearly as simple as setting the alpha of a mesh-based effect to make it more visible based on how fast it’s going.
alpha is a percent sort of, from 0.0 to 1.0 so you just need to MapFloatToRange: input your range of speeds from 0 to whatever your missile’s terminal velocity is, and set the output range from 0 to 1. Then you will have the visibility of the missile’s effect mesh be a straight percentage of how fast it’s going compared to how fast it COULD be going.
There is a way to do this same thing to particles in Cascade and Niagara but I don’t remember the steps. There are youtube tutorials on it though.
Here’s one for Cascade: See this section and the one following it on that page:
Here’s another Answerhub post for how to do it in Niagara:
Setting the alpha on a mesh is going to rely on the mesh having a translucent material on it, and that material has to have a parameter node in it that is wired to the Opacity pin of the material.
You can update these parameters on the material and/or particle systems every Tick.