Gravity Question

This is just a general question about the gravity/physics of certain classes. Not even blueprint or C++ specific, just a general question.

I’ve been trying different methods to change gravitational directions of a player. Characters are hard to deal with because of the skeletal mesh and sliding that happens when rotated. Pawns are hard to get the Movement Component set up in C++, and Default Pawns work somewhat well because they already come with a Movement Component.

However, when trying to apply gravity to a Default Pawn, an error tells me that I must simulate physics on the actor. Simulating Physics for the Collision Component makes my Camera move without my player. Simulating Physics for the Static Mesh that I’m using to represent my character makes it topple over.

But I noticed today that Character classes don’t have any Physics enabled, yet still fall due to gravity. I also noticed that, when rotated, the skeletal mesh doesn’t topple over like my static mesh.

Why is this?

This is still new to me, but for an ACharacter, it has “built-in movement logic” in the UCharacterMovementComponent class and its UpdatedComponent it set to the Capsule component, which is the root component and it has SetShouldUpdatePhysicsVolume enabled. Open the source for CharacterMovementComponent.cpp and search for “gravity” and you will see how it is implemented (see the PhysFalling() function). I think the reason it does not fall over is because there is no Physics Asset and/or Physics Material.

Also note that Collision is different for Skeletal Mesh Actors because

In order for your Skeletal Meshes to collide with objects in the level, your Skeletal Mesh Actors need to have a Physics Asset that is specially created for your object.
Skeletal Mesh Actors | Unreal Engine Documentation