Download

Actors immune to time dilation

Hello everyone,

I am currently working on a very basic shmup using Blueprints.
I managed doing most things with my basic knowledge and a couple Google searches but I kind of ran into a pickle.

I have a main char, an enemy and both their projectiles set-up properly.
The main gimmick of my game is the ability to slow down time for all actors when enemy bullets are close to the player.
The one and only thing I want to be immuned to time slow down is a specific enemy bullet.

I have tried two things :

  • All actors affected by the slow have their respective custom time dilation set with my formula. Immune bullet is left as it is.
    The main problem here is that I have several places where a delay is set (e.g. : enemy rate of fire) and it looks like custom time dilation is interfering with that.
    All timings are off.

  • All aformentionned calculations are applied to the global time dilation and the immune bullet is set a specific custom time dilation every tick to balance it.
    All timings work well with this strategy but the immune bullet movement is not smooth.
    I’ve done tricky calculations to set the custom time dilation and have it so : GlobalTimeDilation * CustomTimeDilation is always equal to 1 for the immune bullet.
    It looks more like a hack than a viable solution to be honest.

Am I missing something or is there a simpler solution you guys can think of ?

Thanks in advance for any help provided.

Did you try speeding up the immune bullets to faster than their normal speed?

This is exactly what I tried in solution #2.
I tried speeding up the immune bullet custom time dilation to compensate for the global time dilation.

Problem is global time dilation varies a lot over time and immune bullets fail to smoothly keep their normal speed.

Sorry to reply to my own message but does anyone have an idea on this topic ?

You can use a little delay to smooth that transition you refer. You can see it in this video
https://youtu.be/nTDcDcV1bPw?t=530