How do I increase the amplitude of a change the closer to the centre of radius a character is?
I have a character (Player1) which slows the movement of other characters when they are in range of the TriggerVolume attached to Player1. How would I create a system whereby pawns are slowed down more the closer to the centre of the volume they are? Could this be done in blueprints?
This is what I have at the moment- how do I build on this to add my intended effect? Any help is appreciated!
asked Feb 14 '18 at 09:10 PM in Blueprint Scripting
I had a Similar Issue Once.
I wanted a grande that caused higher damage based on how close the character was to the actual grenade.
Here was my creative solution.
I added spherical overlaps at different radius's. and took the max damage number and split it between all radius's
500 damage @ 5 radius's 100 damage a radius
then when it exploded it got all players and actors within each radius and applied there damage.
So with this idea you could do the same for your character and anyone who enters the box get slowed by100 and then if they are within 2 boxes there slowed by 200 etc etc..
Hope this gives you a direction to go :-)
first i apologize for posting on a resolved question. that said an alternative solution that would create the slowing effect with a better gradient would be to get the overlapping actors location then calculate the distance between the overlapping actor and the collision volumes center. once you have the distance you would then normalize it. this would give you a number between 1 and 0 which you could then use to restrict the characters movement through the max walk speed or time dilation. this would give you a constant gradient rather than the stepped effect of other answers.
The picture below shows one implementation of this.
answered Feb 15 '18 at 04:13 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here