[2D] Sticking to walls and ceilings
Hey guys, I'm working on a 2D platformer and I want the player to have the ability to stick to the walls and ceilings as well as moving along them, but I have no idea how to do that. My character is a cube at the moment but the finished product should be a wobbly slime. It should not matter from what angle the player approaches the wall for it to work. I've already tried OnCollisionEnter but that won't work due to how my player controls work. It unfortunately makes it so that the player never actually touches any walls/floors, and I'd like to know if I have other options before I start re-writing the whole code... I know many people here are simply posting working code with an explanation alongside it, and as much as I appreciate that, I'd like to do it myself, but I need a little notch in the right direction ^^' (That doesn't mean that you can't post code to help me)
Btw: I'm writing my game in C#
Thank you in advance and have a nice day!
Your answer
![](https://koobas.hobune.stream/wayback/20220612081159im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
C# 2D Top down game how to detect if objects are touching while they can pass through each other? 1 Answer
Moving left and right with one button in 2d Game 1 Answer
Camera Movement Question - How to follow player in Y axis only above certain threshold? 0 Answers
How to check if player is rapidly rotating the joystick? 2 Answers
Object jumping between the touch 0 Answers