Search Unity

VisualEffect in VR automatically pause when player looks away

Discussion in 'Visual Effect Graph' started by heinzdrei, Jan 28, 2022.

  1. heinzdrei

    heinzdrei

    Joined:
    Nov 3, 2019
    Posts:
    2
    I am using Visual Effect Graph 12.1.3 on Unity 2021.2.8f1, currently using OpenXR plugin on windows platform, URP.
    I'm spawning Explosions using Visual Effect Graph. When the player looks away so he doesn't see the explosion, and then looks back, the explosion particle system will continue playing where it last was when he looked away. I'd expect that if something explodes and I look the other way for some seconds, the explosion should be finished when I look back. I searched but couldn't find a setting for this. Anything I can do?
     
  2. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    550
    Hi @heinzdrei ,

    This is the default behavior for performance reasons, so you don't simulate all effects all the time, even when they are not visible.

    To make it work in your use case, select the VFX asset in the project folder, and in the inspector change this setting to always simulate the effect:


    Hope this helps!
     

    Attached Files:

    heinzdrei likes this.
  3. heinzdrei

    heinzdrei

    Joined:
    Nov 3, 2019
    Posts:
    2
    Perfect, this is what I overlooked. Thanks a lot for the fast response!
     
    VladVNeykov likes this.