hello Forum,
i don’t get it to work : (. i have to admit that i am an scripting newbie mainly writing in Static JavaScript.
OK, Before my actual program starts (or the Main Level is loaded) i want to play a little animated Logo (animation done in 3dsmax and the Animation Clip is automatically started). When the animation is over i want to fade in a plane in front of the camera (by Mathf.Lerp of the alpha value of the main color of it’s material) to hide the Logo.
What is the best practice how trigger this FadeOut-function when the animation is over and then trigger the loading of the level when my FadeOut- function is over?
i experimented a lot with Time.realtimeSinceStartup and if-conditions. But the Mathf.Lerp seems to be allergic against everything that has got to do with time (the fade works fine in the update function if i fire it by an if-condition which has nothing got to do with time). But i need to time things anyhow that are happening or triggered in my program.
Is there a common practice how to time things (with functions which have for loops inside)? And how do i make this frame rate independent (i know with time. time and time.deltatime, but i don’t get it right).
Or can anyone recommend a reading in the internet or a good book?