- Home /
Question by
gipsnichmeer · Dec 21, 2020 at 06:51 PM ·
bulletframeratefixedupdatedeltatimepysics
Time effected Bullets
Hello, I want to instantiate Bullets. The Player can choose the TimeScale.For this example we decrease it, so we are in slow-motion.If i instatiate the bullets in fixedUpdate, they were instantiated slower but to prevent the game from lagging i have to increase FixedDeltaTime.Now the bullets are instantiated as fast as in normal speed.I tried this code but it didnt work
void FixedUpdate{
counter++
if(Input.GetButtonDown("fire1")){
if(counter > 1 / Time.timeScale -1)
{
counter = 0;
Shoot();
}
}
}
Can someone help me?
Comment
Your answer
Follow this Question
Related Questions
Movement is frame-rate dependant despite using delta-time 0 Answers
Physics behaviour changing with framerate - Is FixedUpdate() actually working properly? 3 Answers
Camera Stutter on RayCast Collision Problem 0 Answers
Getting Input every few frames? 2 Answers
trying to regulate character speed. 1 Answer