Planetary Gravity

Hello all I would appreciate some help.

I am working on a ‘planet gravity’ system. I am using a 2d side scroller character and a cylinder which locally I want to represent a planet. I want him to walk upside down and the gravity to be relative to the centre of the cylinder and so far I have got it to work. I have only two problems, one of which is more major.

As you can see, my character’s feet point towards the local centre of gravity. The problem is, when he drops below the middle half of the sphere, his animation flips, so that he ‘moonwalks’. I want left to move him anticlockwise; he plays the ‘left’ animation for a while but as soon as he drops below the 90 degree angle he plays the ‘right’ animation while moving anticlockwise.

I have tried introducing an ‘isupsidedown’ variable which (correctly, I have debugged) checks whether he is below this angle and tries to flip his animation but it doesn’t seem to work. I have tried ‘add control rotation’ and ‘change world rotation’ on the capsule component.

P.S. My other problem is: I would like to smooth out the edges of the cylinder, since when expanded it is quite angular.

We’re probably going to need more information. How are you ‘flipping’ the animation?

YouTube tutorial please! It looks awesome.

Sadly my computer had a hiccup so everything was lost, can’t do a tutorial. I was quite proud of it apart from the fact the camera was screwed up.