How to make a volume to slow down the player's velocity

The most basic and robust setup would look like this, inside the trap actor:

It essentially takes your current velocity and applies a % impulse in the opposite direction. This is an actor with a box collision you can put anywhere in the level and it will only affect the class you cast to. You can expose that -.25 as a variable so you can edit the slow down magnitude of traps you place in the level. If you turn it into a positive value, it will give you a boost.

I also like the idea losing speed the
longer you’re inside.

This should be good enough to build on:

This takes away percentage of your speed every frame for as long as you’re in the volume. Similar to the above. This will not actually stop you in place as it works around percentages; you can instead deduct a fixed value rather than sampling the ship velocity - your design choice.

Image from Gyazo

Do tell if it helps at all and good luck!

1 Like