Announcement

Collapse
No announcement yet.

Can I force refresh of a pawn's light environment?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Can I force refresh of a pawn's light environment?

    In my game, the pawns in your army can go to a kind of staging area where you can inspect them and organize them. When I teleport the pawns there and move the camera there, many of the pawns are too dark. Is there a way I can force the light environment to update? I suppose it could be a different issue, but if there were a way to force the light environment to refresh, then at least I would know that the light environment isn't the issue.
    Check out Himeko Sutori, the upcoming tactical RPG where you control armies of over 100 unique characters.

    #2
    I feel stupid. I just found DynamicLightEnvironment.ForceUpdate(). I'm going to take a look at that.

    Edit: Nevermind. It turns out that function doesn't do what I hoped it would do. I think it reattaches a component to its owner. But it doesn't seem to solve my problem.

    Edit 2: And DynamicLightEnvironment.ResetEnvironment() doesn't seem to fix it either. Maybe something else is going wrong.
    Last edited by Nathaniel3W; 06-01-2019, 07:35 AM.
    Check out Himeko Sutori, the upcoming tactical RPG where you control armies of over 100 unique characters.

    Comment


      #3
      Never had that problem, but have you tried to delete the component and create one new?
      Provisional blog: http://cobaltudk.blogspot.com.es/
      Videos: https://www.youtube.com/user/cobaltudk
      Facebook: https://www.facebook.com/babylonprojectgame/

      Comment


        #4
        in theory making the light environment dynamic (not just using the dynamiclightenvironment class, but also having the dynamic property enabled) should take care of this
        Follow me on Twitter!
        Developer of Elium - Prison Escape

        Comment


          #5
          Tried disabling, re-enabling the light environment, destroying it and creating a new one, and the functions listed above... I am certain the issue was with the DynamicLightEnvironmentComponent. No shadows, and nothing over their heads, but over here the pawns are lit up, and over there the pawns are dark. And if I teleport them from one spot to another, they don't change from light to dark until I move the camera, and then they fade to light/dark over about a second. No idea what was causing it.

          They all have a partial emissive and diffuse color. I gave them emissive so that you can see them even in a dungeon where there is very little lighting, and I gave them diffuse so they still react when moving into and out of light. Eventually when I couldn't figure out what was going wrong, I just set their material instances' diffuse to 0 and multiplied their emissive by a higher number to compensate for it. When I leave the staging area, I set all their material instances back to normal.
          Check out Himeko Sutori, the upcoming tactical RPG where you control armies of over 100 unique characters.

          Comment

          Working...
          X