Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Titan Quest Cave loading effect

Discussion in 'Scripting' started by Solverto, Jul 8, 2023.

  1. Solverto

    Solverto

    Joined:
    May 25, 2019
    Posts:
    1
  2. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    449
    You need to ask their developers. But looks like there's two stages in the cave transition, first stage creates a "bubble" around the player that could be a light source that's lighting up in front of the player. Looks like the second phase switches off sunlight so all thats left is the player's light source.
     
    Kurt-Dekker likes this.
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,563
    I concur. There's definitely two processes. One is the standard "see character always" type of wall ghosting, done in a circle around the player, and the other is simply fading out the outside world. It's pretty nicely done here.

    If I was doing it, I would use two anchor points that you author into the scene, one at the cave mouth, one inside a little bit.

    Using those two anchor points and your player's position you would use Vector3.InverseLerp() to find out a number from 0.0 to 1.0 for how far into the transition you are, and then just some kind of shader to blend between the two effects, driven by that 0-to-1 number.