Walking up walls
Chobbiface
PRO Posts: 491
I'm just wondering if there is a better way to make a player be able to walk up walls.
At the moment I've got it working as when the player collides with the wall, it rotates 90 degrees to correct the orientation of the player, when it collides with the ceiling, it then rotates another 90 degrees etc.
However, using this way, i've noticed that movement becomes very slightly buggy. If I use the keyboard input, for example pressing left key till he reaches the left wall, he will walk up the wall and rotate correctly, but after the rotation he will always pause, so I have to lift the left key up, then press again for him to continue walking up the wall. This happens after every rotation on the ceiling and again when he reaches the other right wall. The same thing happens using accelerometer as input. I was just wondering if there is a method which will make movement seamless as he walks up the wall.
Thanks much appreciated.
Chobbipod
At the moment I've got it working as when the player collides with the wall, it rotates 90 degrees to correct the orientation of the player, when it collides with the ceiling, it then rotates another 90 degrees etc.
However, using this way, i've noticed that movement becomes very slightly buggy. If I use the keyboard input, for example pressing left key till he reaches the left wall, he will walk up the wall and rotate correctly, but after the rotation he will always pause, so I have to lift the left key up, then press again for him to continue walking up the wall. This happens after every rotation on the ceiling and again when he reaches the other right wall. The same thing happens using accelerometer as input. I was just wondering if there is a method which will make movement seamless as he walks up the wall.
Thanks much appreciated.
Chobbipod