In one level of a game I’m making, when you go into certain areas of the level or talk to people, the side scroller drifts off in some random direction and stops being centered on the player. It’s like it has a mind of its own. It’s really obnoxious and I don’t know how to fix it. I’ve tried everything I can think of.
When I uncheck those it still drifts, and worse, it won’t move the screen down to the lower areas of the level.
Here is the game, complete with semiexistential dialog: https://flowlab.io/game/view/121500
Hmmm… Interesting bug… I have no idea why that’s happening, but I have 2 ideas why
- Your NPC’s move the screen when you talk to them
That might have something to do with it
- Your scroll view might not be big enough, or you hooked it up wrong
I believe you have to hook up the scroll view to the x output on velocity and y output on impulse.
(Someone correct me if I’m wrong)
The NPC thing would explain the drifting, but not the shaking. That’s the most annoying part. And I don’t know how the NPC’s could be making the screen move.
Yeah you should make it so that when you come in contact with a NPC you should make the game pause. That might help
That helped with a lot of the scrolling issues, thanks! The game is still shaky though, wish I knew what was causing it.
The struggle is real
I’ve noticed that a lot of the screen scrolling happens when I bump into walls. I’m not sure why this would be the case, but maybe that information is helpful in pinpointing the problem?
I found your problem. In the third level, off to the side you have a second player. delete it.
Okay, that fixed all the scrolling issues. The game still shakes, but it really isn’t a problem. (Why does it shake? We may never know…)
It doesn’t shake for me, once I fixed the scroll view and deleted the player, everything was fine