Set Particle Parameter in Blueprint by Camera Distance
Hi, I like to set the particle opacity by camera distance in blueprint. I set up this blueprint so far, but it won't work.
There must be an error in the vector math of the cam distance formula, since when i make a literal float, i can see, the parameter connection works. 0 brings 0 opacity and 1 brings a lit particle ingame.
but when i connect the vector stuff, the particle stays at 0 opacity :( can you help me out?
asked Oct 15 '14 at 09:50 PM in Blueprint Scripting
Use a subtraction instead of a division.
Let's say you have the camera and the actor at [1,1,1] and [3,3,3]. If you now subtract your camera from your actor you're left with [-2,-2,-2] which is a defined length and will provide you with the result you want.
However vector division is mathematically only possible if you provide special input and I'm not sure what unreal is doing inside of that node.
Here's a link to a discussion about vector division if you're interested.
Regardless of this though division only tells you how often the lower one fits into the upper part meaning you will never really get a useful number if you're searching for distance or anything like that.
Follow this question
Once you sign in you will be able to subscribe for any updates here