How do I increase the amplitude of a change the closer to the centre of radius a character is?

Hi there,

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!

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 :slight_smile:

Seems like that would do the trick- thank you for a fast reply!

Glad I could help.

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.

Hi,

I considered this but he stated that he wanted something when approaching the character in question. So my thought was a stationary or moving boss that he wanted to have effect players in range. I have a tendency to try to make things reside on what is causing the effect. part of old OOP training I guess so I offered what I would have done for something like that. We all have unique ways of doing things and that is what makes collective minds better then one.

But this is unreal and there is always 50 different ways to skin a cat and your solution might be what the next person is looking for.

its always good to have more then one mind thinking about something :slight_smile:

And your input is always invaluable ThompsonN13 :slight_smile:
Thank you.

i agree that there are many ways to accomplish the same thing and i also agree on putting the script on what is causing the effect in most cases. this method would work on a boss and would require only one extra collision volume instead of the several you had. i post it merely as an alternative to what you wrote. the method i suggested is more of a gradient where yours is stepped so future readers may be looking for one style over the other.

In my opinion my method is smoother and yours would be better performant. also i totally know what you mean about OOP i do the same myself.