Replay Bug: Ball shaking

Replay System implemented! But it has a bug. The ball does not run smoothly, instead it kind of shakes while moving through stage.

Git hub project link: https://github.com/Coradesque/TwinSticks

PLEASE HELP!!! :weary:

Iā€™m not being able to open it, can you share the script some other way?

I just narrowed down the problem, it is the camera movement during the replay, not the replay system itself.

I donā€™t know yet how to fix it without break the game design Iā€™ve been following, so I upload all the game folder to google drive. Be free to check it out, if you want.

Either way, Thanks for answering!

https://drive.google.com/open?id=0B7CfhhWYUiHZcUwwSGlMMl9NcmM

1 Like

OK, found the error.

The problem is that the update within the ā€œBallUserControl.csā€ is running before the actual change to the ball position due to the playback, so it changes the camera position and then it changes the actual ball position due to the replay mechanic, this is what gives this glitchy behaviour. If you cut and paste the: SendMessageUpwards("PlayerPosition", this.transform.position); to make it run after the ReplaySystem.cs replay code, it will fix the problem:

 void Update()
    {
        if (isRecording)
        {
            Record();
        }
        else
        {
            Playback();
        }
        SendMessageUpwards("PlayerPosition", this.transform.position);
    }
1 Like

Yess!!!

You really fixed the bug without break the game design. :clap::clap::clap:

Thanks so much!

1 Like

Iā€™m glad for being able to help :slight_smile:

Privacy & Terms