Slow motion within specific area?

Is it possible to slow time within a specific radius of the player.
For example if the player presses the slow time button on the keyboard then everything within a 10m radius is affected and everything outside the area remains unaffected.

If this is possible, any help on how to achieve this?

Many thanks,

I saw a special parameter for game speed not so long ago. But I’m not sure you can use it for particular actors.

Anyway you have two options:

  1. Easy one and I think bad one. Skip frames in every tick for affected actors or use custom every tick event (which can be called with different frequency). This leads us to laggy behavior in some cases.
  2. Hard one. Make a special multiplier for every actor movement actions. Instead of adding 50 to location, add 50*0.5 and so on.

Do you still need any help?

The first way is indeed very laggy.

The second one I do not quite understand what you mean.

Would you mind to explain that second way a little more please?

Ok. I guess, basically you want to slow pawns and any actors. You can down max speed for pawns, and this is simple (but they can change animation in that case).

But what if some actor is moving at the affected area? It depends on the way how you move them. Seo you can set lower interp speed or decrease a delta location, or whatever you make in your code.

Wouldn’t it be as easy getting all actors in this radius and setting their custom time dilation to something < 1?

Just stumbled across messing with time dilation while trying to get a negative radial force bomb to work.
[(Here’s the link to that thread][1])

Using object and trace channels, you can the time dilation of the specific actors once their collisions intersect.

https://puu.sh/vCnQd.png

Hope this helps. 8)

it is super easy.

add a sphere collision to your character.
then on its event begin overlap get overlapped actor and set its time dilation to be less than 1.

then on its event end overlap do the same and set actor’s time dilation to 1.