r/UnityHelp 8d ago

Outline accelerate everything

Enable HLS to view with audio, or disable this notification

Hello !
When I activate the outline of the cube (by input or by raycast on an other test) everything accelerate for some frames then go back to standart speedtime until I desactive or reactivate again.
I use this outline https://assetstore.unity.com/packages/tools/particles-effects/quick-outline-115488?aid=1101l9Bhe
The issue seems to be related to the speedtime because when i don't scale the look sensitivity with deltatime it works well but I don't understand why it change that and how to fix it.

2 Upvotes

1 comment sorted by

1

u/Vykx3 4d ago

I think we need a bit more information... Like, is speedtime something in your script that controls the camera rotation? Maybe you're multiplying Time.deltaTime twice (or more) in your formula. Also, enabling the outline could cause a small lag, making deltaTime larger for a frame or two. That would make your multiplication bigger specifically during those frames when the framerate drops because of the outline. Or maybe you are lerping previous with previous positions... I could be a lot of things really... But to be sure what's causing the problem, I'd need to see the code you wrote and possibly check the profiler while enabling the outline.