jerky when collecting objects

I’m making a 2.5D platform game.

I have a character running into a diamond object(trigger set on diamond) and in the code i’m using

gameObject.SetActive(false);

but when the diamond disappears I have a slight jerk when it disappears (the scrolling kinda jerks(camera movement)). I have checked the cpu usage etc and is low, i’m not sure why this is happening?

Thanks

Open the profiler and take a look at that - is there a “spike” in the frame time when this happens?

i’ve been messing about with this for ages, this is a very odd thing but i noticed my monitor was on 59hz, changed it to 60hz and i also had to set vsync in the unity editor to every second v blank. When i run into the diamonds, they disappear but they dont jerk, not sure the exact reasons for this but it works…

i forgot about the profiler, it doesnt now anyway, thanks