Slippery Character Movement & Wall Collisions
|
|
This was essentially an oversight caused by application of PhysicsMaterials as to make the player slide down the wall when colliding (and not get stuck!) the platforms needed 0 friction but this meant the player would also slide along the surface.
This would also have been a major problem when I integrate mobile ’tilt’ controls using the phone’s accelerometer, this is due to the fact that if the player slides around even if no input is being made it would require the player to tilt their phone to counteract the natural slide at all times – making the game very hard to control and frustrating.
The game itself will already be hard enough to control with the tilt so we need as little-to-no input lag as possible: if the player moves right they move right, if the player stops moving right they stop right then and there.
After researching I found that there was any way to restrict PhysicsMaterials to a certain side/face of the object, via Unity’s Platform Effector 2D Component, with that in place for all objects the core principles and movement mechanics of the game was sorted.