I am making a game in which i multiply the SPEED with deltaTime.
The value is mostly normal but at times it shoots up to 2x the normal value. Maybe its because of the frame rate?
Normally the value is between 7.9 to 8.3 , but the spike takes the value up to 17.
Is there any way to fix it? I am doing this in the update() method.
You could make an if statement to check if it’s too much and then assign it a max value if it is. if(moveAmount > maxValue) moveAmount = maxValue
I am not sure what kind of functionality you need, but if you want it to move at the same speed you want this: moveAmount = speed*Time.deltaTime;
The spikes are caused by framerate since it is moving at the same speed but you just see less frames of it. As for the value jumping between 8-17 I’m guessing your speed value is somewhere around 300-1000.