What would be the best way to prevent the player from being moved up in this manner,
and rather push the player to the sides?
I have already checked the collisions on either of the walls (these are also visible in the video) and nothing about their collision warrants the player moving upwards.
My current theory is that it has to do with the Player’s own Capsule collision.
Moving walls like these are going to be a significant part of this game, so having an elegant solution will make all the difference
What I think is happening here is the Capsule collision getting pinched between the moving wall and that column on the right.
If you stand in the exact middle of where that block is pushing do you still move upwards?
If not - the simplest solution might be to always have an opening just beyond those push blocks. Changing the collision of those columns to something smoother might help. (but I think it would still be possible to pinch) Another thought is to have logic in the push block that locks any upward movement when it touches the player. (In this situation, even if pinched and pushed into the column, physics should pop you out of the column in the most reasonable direction)
Yes, I know the column and moving wall are causing the movement, I meant more the reason why it chooses to push the player up of all directions, can you elaborate on ‘locking any upward movement’? I’ll try that next!
Sadly leaving an opening between the 2 meshes would only be a solution in this particular instance but our game will rely heavily on moving walls. There will be times where such an opening is not possible or practical
Got it, for whatever reason, the solution in this post worked!
Once again it boiled down to the glitchy behaviour of Capsure Components.
In short, in tick, move the character controller back and forth a bit, but in moving back enabling Sweep to perceive more accurate physics.