I’m just starting UE4. I downloaded the C++ Template “Third Person” and opened it up. I see there is a C++ class that inherits from ACharacter call ThirdPersonCharacter.
For some reason the template also has a Blueprint with the parent ThirdPersonCharacter, that somehow has a physical entity representation in the game.
When I go into game mode and inside the gamemode constructor I use
DefaultPawnClass = ThirdPersonCharacter::Static()
It will give me the same camera and movement, but the physical representation is gone? Where is the combination of the blueprint and it’s parent class?
I’m confused where that is coming from and how to have that in C++ instead?
If you always spawn without a physical entity representation, you may simply need to change the default game mode to one that includes the third person character:
Thanks, I see the file structure now. It was confusing from the “content” panel. I’m used to just having a real file structure.
Do you know if I can make the default pawn a c++ class and give it the mesh and other contents? I’m having tons of issues getting the blueprint to update when I change c++ code. I have to remake the entire blueprint typically for each change, which is killing learning the camera functions.
"Should" be able to modify a good portion of the C++ class a Blueprint is based off without it having any issues unless Blueprintable functions or variables get changed.
e.g. You rename “USkeletalComponent* Chest” to “USkeletalComponent* Torso”.
What kinds of changes are you making?
As for the camera functions, you could always separate the camera from the character/pawn entirely by using a PlayerCameraManager.
Our game uses a true first person, so having decent control of the camera was a must.
I originally used a camera component on the characters mesh, manually positioned and the like.
In the end I found using customised player camera manager more to my liking.
Even when it uses a non-first person view for spectating (or debugging), it still uses the player camera manager just fine.
It simply creates or removes what ever component it wants to use.
For example, the over the shoulder view: