Answer the question
In order to leave comments, you need to log in
How to Slow down Enemies and Obstacles in 2D Platformer on Unity?
Hello. We are developing a 2D game where the main character can slow down enemies and various obstacles. How to correctly implement the coding of this gameplay mechanism in Unity?
Thank you in advance.
Answer the question
In order to leave comments, you need to log in
I will assume that you can declare a general variable and use it to calculate the speed of movement or time delay.
either using Time.timescale to slow down all time in the game world (absolutely everything will slow down), or to each individual object in the formula of its movement "distance traveled = speed constant * time delta" add some coefficient k, which will slow down the movement: "distance traveled = rate constant * time delta * k" (0 < k < =1)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question