ShooterGame Switch to Third Person

I have managed to get the shooter game to to work quite well as a third person shooter. However I did it through editing the “PlayerPawn” Animation and Mesh replacing “HeroFPP” to “HeroTPP”.

I then coded a spring arm with a follow camera attached to the HeroTPP and it works great.

I was wondering if anyone knew how through C++ I could change the Mesh and Animation to from “HeroFPP” to “HeroTPP”. I looked although the code and can’t seem to find where it loads the meshes and animations. Thanks in advance!

I would also like to know where in the code the character model is referenced. In the Blueprint example its easy enough to change the skeletal mesh but doing a search in all files for “HeroTPP” its not listed once in the code. Where is the Skeletal Mesh referenced?

OMG I finally figured it out! Inside the editor there’s still a character blueprint that’s referencing the Skeletal Mesh you want to use. Open Blueprints/MyCharacter and in the Defaults load in YourCharacter skeletal mesh and also make sure to add in YourCharacterAnimationBlueprint

Sorry I didn’t reply earlier to your question. Basically the code creates and enables the blueprint and all its properties. If you look at the C++ code you will see UProperties. From the code they aren’t assigned anything. After enabling the UProperties you can see them and assign them values in the editor in the character blueprint.

Which file are the Uproperties located in? Character.cpp?
I’d be interested to see how you’ve set up your project. I’ve coded in a Follow Camera and a Camera Boom but no matter what I do I can’t get the 3rd Person Mesh to show up via the code. The only way it works is if I swap the meshes and anim blueprints inside the pawn blueprint.

They are located in the Character.h. So you are doing it right. Instead of coding in all the animations, mesh, and sounds they simply create a UProperty which creates a field in the Character Blueprint where it can be assigned values from the editor. The Actor class has most of the properties that you see in the Character Blueprint add in by default. I’d be happy to share code with you. Would you like me to send you my .cpp files to study?

That would be really helpful.
My goal with this might be quite different from yours so I’m actually trying another idea. My goal is to get a “True” First Person view where you can see the Player’s body when you look down. Sadly I’ve spent all day trying to figure it out (I’m not a programmer) and have had no luck. I got it working in the Third Person C++ template but I’d like to take advantage of all the extra code in the Shooter Game template like the UI, Game modes etc.
Right now I’m playing around with adding some legs to the pawn blueprint and setting them up with an animationBP so they run in place along with the Shooter Hands. It wouldn’t be True First Person, but if I can get it to work, it will be good enough for me.

Interesting, I’ll play around with that and see if I can get it working. I’ll let you know if I have any success.

Hello !

I’ve just finished writing a complete tutorial on how to “properly” (or what I thik is the proper way) add third person support to the Shooter Game sample. It allows you to toggle between first/third person and doesn’t take away the advantage of using the first person mesh (arms only) in first person view.

Here’s the wiki link: Shooter Game - Toggle Third Person

Feel free to let me know if I did anything wrong or if some improvements could be added :).

Hey Ky! Can you send me your files of Shooter Game - Toggle Third Person, i’m cracking my head to do this =) !! Thanks My, i appreciated !!

Thank you