- Thu 3 Aug 2017, 00:31
This would be very tricky... The platformer behavior support only a positive and (maybe) a negative gravity, never horizontal gravity, so platformer is not a good idea
Since the character can stand in only one platform at a time, maybe you can link a character and a platform, and then do tricky maths to detect the platform side the character stand at, and move/roate it in function of the side. Of course if the character collides with other platform different than the one it's "linked", you could switch the platform link and fix the character to stick to the new platform.
As I said, it would need some math to detect the side of the platform to stick at. you should play with widths/heights/xs/ys, not funny at all
What do you want it for?, an old-style AI (you know, those old bugs/slimes that walk all the way around)?
EDIT: Thinking about it... The maths could be not soooooo tricky if you use points in a smart way, for example put the Centre point of the character at the center on X and bottom on Y (middle of the feets). And on the platform add 4 points (or calculate 4 variables), one for each vertex. This setup would make it easier to know in wich side the character is at, and rotate over the platform without changing the maths, because the Center point will stand over the platform, at the same position
I should be studying now :/