Skip to content
This repository was archived by the owner on Nov 8, 2019. It is now read-only.
This repository was archived by the owner on Nov 8, 2019. It is now read-only.

Controller not working when Time.timeScale = 0 #690

@wojwen

Description

@wojwen

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;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions