Trying to add a "rolling" mode to my game where character is a cylinder. Physics are strange

Hey everyone,

I’m making a game and I’m trying to implement a feature where the player can switch between walking and rolling modes, but my issue is that the character has a cylindrical shape, and rolling has proven difficult to achieve.

Whenever physics are enabled and you press forward to apply torque and roll forward, all is fine until the player tries to turn left, right or jump, as it seems the center of mass is off and the character goes flying every which way except where the player wants. I’ve only been able to make him roll straight off a test half-pipe once…

Can anyone tell me how to properly set the center of mass on a skeletal mesh (as I cannot see where it is, so the center of mass offset does very little for me, but I’ve read that there is a feature where you can visually see where it is on a mesh, but I’ve had no luck finding that feature…) or if torque is not what I need to be applying?

It probably also doesn’t help that when using the third person template like I have been, the default method of collision for the player is a capsule, which certainly doesn’t help… Going up against walls and stuff is a nightmare.

Can anyone point me in the right direction? Should I seek another more controlled method of rolling (which would be nice, but I’m not sure how to go about that).

Update: the ramp I was testing on was rather low-poly. It seemed increasing the amount of polygons/sides in my half-pipe helped my character roll more “expectedly,” but I feel like diving into moving center of mass and stuff would help him stay more planted on the ground when just on a flat surface, which is what I’m looking for.