vykx
New Member
Posts: 5
|
Post by vykx on Jun 9, 2021 14:29:54 GMT
Hello! I have a small problem with the shake. With high frame rate works fine, but as the frame rate drops the shake gets stronger. drive.google.com/file/d/1Pog-XKs0NGFJ6EjDsuY0fnVEggFowmTV/view?usp=sharingI'm using an old version of the asset and I can not upgrade because I have changed many parts of the code. Perhaps you've already solved the problem, in that case, could you send me the fixed lines of code? Thank you very much! Attachments:
|
|
|
Post by Luís Pedro Fonseca on Jun 10, 2021 12:39:24 GMT
vykx I believe this issue was fixed but I can't pinpoint exactly when or where. My suggestion is to download the latest version and simply replace the Shake extension component.
|
|
vykx
New Member
Posts: 5
|
Post by vykx on Jun 11, 2021 14:35:12 GMT
I replace the shake extension but the problem still there. The problem I think is at line 405.
newShakePositionSmoothed = Vector3.SmoothDamp(_shakeParent.localPosition, newShakePosition, ref _shakeVelocity, smoothness, float.MaxValue, Time.unscaledDeltaTime);
|
|
vykx
New Member
Posts: 5
|
Post by vykx on Jun 11, 2021 15:07:56 GMT
for now I fixed it in a weird way like this:
newShakePositionSmoothed = Vector3.SmoothDamp(_shakeParent.localPosition, newShakePosition, ref _shakeVelocity, smoothness, float.MaxValue, Time.unscaledDeltaTime > 0.016666f ? Time.unscaledDeltaTime / (Time.unscaledDeltaTime * 120) : Time.unscaledDeltaTime);
is not the cleanest way but for now, it works!
|
|