I apologize in advance because I feel the solution for this problem is fairly simple, but I can't quite figure it out. I've combed the forums and have found similar questions to what I'm asking, but nothing has fixed the specific issue I'm having.
The game I'm making is an autorunner. Instead of using the Scroll To behavior on the player, I have a sprite called spr_ScrollToBlock that is set to stay ahead of the player by an X value of 500.
The issue is difficult to describe, but easy to understand when you see it. If the player collides with an obstacle before the screen starts to scroll, the knock back effect is applied correctly, as seen in the picture below:
<iframe src="https://giphy.com/embed/O0L0onyK0A8fHfjPGU" width="480" height="270" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p><a href="https://giphy.com/gifs/O0L0onyK0A8fHfjPGU">via GIPHY</a></p>
As soon as scrolling begins, however, the knock back effect no longer works when the player collides with an obstacle:
<iframe src="https://giphy.com/embed/g7SInooUIP4VwzkDc2" width="480" height="270" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p><a href="https://giphy.com/gifs/g7SInooUIP4VwzkDc2">via GIPHY</a></p>
Attempts to resolve:
As previously stated, I feel like this is an easy to solve issue, I'm just missing something simple. I've tried to resolve the issue by doing the following:
Adjusting player max speed, acceleration, and deceleration
If you have any suggestions, please let me know. I greatly appreciate it.