Moving a box along angled platforms

We have platforms made up of odd shaped polygons and we need actors to rotate as they move along them based on the angle of the side they are currently colliding with. If I can get the b2Vec2 pair of the side currently being collided with I can calculate the angle of inclination and then apply the angle to the actor. This is so they can rotate correctly as they walk up and down sloped platforms.

So how do I get the b2Vec2 pair of the side currently being collided with?

Also is this the best way to have a box move along an angled polygon or do you suggest another way?

Finally will you be implementing a b2CapsuleShape any time in the near future?
Why not use the contact normal?

There is no plan to implement capsule shapes soon because they can easily be approximated by two circles and a box.
Erin Catto wrote:
Why not use the contact normal?


How can I use the contact normal to get the angle?
Am I missing something? It is just simple trigonometry. Not really a Box2D topic.
Thanks Erin, it was simple enough 🙂

For others who may want to know the answer to this get the normal from the worldManifold and then use atan() to get the angle in radians.

Code:
b2Vec2 normal = worldManifold.normal;
float angle = atan2f(normal.y, normal.x);

Original thread: https://box2d.org/forum/viewtopic.php?t=5183