Interesting Time issue

Hey, I’m a student and I’ve been working on a flying game for two quarters now. But I’m running into an issue. Whenever the trebuchets attack the glider, the speed of the scene goes haywire, almost doubling and quadupaling in speed. This seems like an issue with time, but I’m not adjusting any time functions.
The trebuchets are running a modified version of the AI script from the FPS tutorial. The only changes I made were to keep the enemy stationary and face the player.
It may be important to note that this same issue occures when I destroy the castle(the mission objective), which also doesn’t call any time functions. The castle only tracks its own health and spawns a prefab of a “broken” castle.

have any of you heard of something like this? I’m dumbfounded and so is my teacher. Any hints on where to start looking?

Hi, welcome to the forum!

Are you scaling all object movement using Time.deltaTime? If you move objects by a fixed amount each frame, they will move faster when the framerate increases, say if the CPU load decreases with the action in the game. So, if you have something like:-

function Update() {
    transform.Translate(Vector3.forward * speed);
}

…it will be framerate independent if you change it to:-

function Update() {
    transform.Translate(Vector3.forward * speed * Time.deltaTime);
}

Note that you might need to alter some of the speed values of your objects for this to work. It’s likely that everything will suddenly slow down after adding the Time.deltaTime.