A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/googlevr/gvr-unity-sdk/issues/690 below:

Controller not working when Time.timeScale = 0 · Issue #690 · googlevr/gvr-unity-sdk · GitHub

Few days ago I posted a thread about this bug. It's about the controller not working properly when Time.timeScale is set to 0. The controller isn't visible if Time.timeScale i 0 from the start, it doesn't interact with UI and tooltips are invisible. I managed to fix this by making following changes:
In GvrLaserVisual.cs replace
return lerpSpeed > 0.0f ? lerpSpeed * Time.deltaTime : 1.0f;
with
return lerpSpeed > 0.0f ? lerpSpeed * Time.unscaledDeltaTime : 1.0f;
In GvrControllerVisual.cs replace
float deltaTime = Time.deltaTime;
with
float deltaTime = Time.unscaledDeltaTime;
and in GvrArmModel.cs replace
float animationDelta = DELTA_ALPHA * Time.deltaTime;
with
float animationDelta = DELTA_ALPHA * Time.unscaledDeltaTime;


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4