Unity-Technologies / SpaceshipDemo

Spaceship Demo - AAA Playable First person demo showcasing effects made with Visual Effect Graph and rendered with High Definition Render Pipeline
Other
1.05k stars 276 forks source link

hologram table animation prematurely ends. #5

Open clementshimizu opened 4 years ago

clementshimizu commented 4 years ago

Sometimes, but not always the hologram table animation galaxy state animation starts playing but then it closes before you have the opportunity to click on anything. The "FTL target system" loading bar is up and blinking. But the galaxy faded out to nothing.

I have been able to find is state machine attached to hologram table (if i make the state public) is at Galaxy and the animation on galaxy/GalaxyFadeIn is a few frames beyond the end of the animation if the bug occours, and at the blue line if the bug doesn't occur. I am unsure if that is normal or not, but if i rewind the animation back to the blue line the galaxy comes back.

This is what it looks like when the bug does not happen: image

This is what it looks like when the bug happens: image

clementshimizu commented 4 years ago

I think i found the bug in GameplayIngredients.Rig.DirectorControlRig->Update line 64 director.time = newTime should be

if (m_PlayMode == PlayMode.Reverse) {
director.time = newTime < 0 ? 0 : newTime;
} else {
director.time = newTime > director.playableAsset.duration ? director.playableAsset.duration : newTime;

this change prevents the timeline from being played outside of the playable region if for example the time step is greater than one fps. Not sure if this is the correct fix because the code needs to be changed in the package manager library.....