How to set target for "Set SkeletalMesh" - Third>First Person

Hi guys,

I’m having trouble switching between third and first person skeletal meshes in blueprints. The camera zoom blueprint is sorted, courtesy of [this video by TPS][1], which uses the scroll wheel to zoom from third to first person.

I can get FPP and TPP to print in the correct states so the FPP or TPP state is recognising correctly. I also think I know the problem and the solution but I’m not sure how to put it in place.

[Warebear answered the question here][2] but I cannot figure out how to “get instance of character mesh” and set up the target for Set SkeletalMesh.

Here’s what I have and what I need:

Thanks in advance. Any additional advice is welcome too - thanks guys :slight_smile:

Based on what I’m seeing, I believe you would take the pin from the HeroTPP at the bottom and link it to both targets, since the SetSkeletalMesh (likely) takes in a character or actor instance.

Inside your Character Blueprint, the Slot for your Mesh is just called “Mesh”. This is the thing you can get and also need to plug into “Target”. In “New Mesh” you just select the ThridPerson and the FirstPerson Mesh you created.

This should do all the work.

Here is a picture with my test setup:

http://puu.sh/eeCnX/fcfd4fecf2.png

I just duplicated the Third Person SkeletalMesh and gave him a Red Material for testing. It’s name is “First Person” like you can see in the “Set SkeletalMesh” Node. Pressing K will change the Skeletal Mesh for me everytime i press it (because of the flipflop). For you that would be the Event Tick + Branch + “ThirdPersonState” Bool.

It’s all located inside the Character Blueprint.

Sorry for the late response!

The main problem I’m having is that I don’t know how to pull the HeroTPP into the graph. HeroTPP is currently set as the skeletal mesh in the defaults tab. I want to switch between that and a first person mesh (HeroFPP) when the camera zoom reaches certain point.

I just can’t seem to find the correct reference for HeroTPP

http://i.imgur.com/7R6oekj.jpg

Cheers - that seems sound. Problem is I’ve given that a spin and Unreal crashes to desktop every time it executes. Setting mesh visibility works and the strings print correctly.

http://i.imgur.com/fBcIKnQ.jpg

You’re spot on - I tried the above set up in a blank project and it works a treat.

Digging a bit deeper I’ve found what the issue is: the camera boom is attached to a socket on the third person mesh. The camera position dictates the First or third person state. So of course when I get rid of the mesh, the camera boom isn’t attached to anything and brings the system crashing down. I’ve been pulling the rug out from underneath myself. At least I know now. Back to the drawing board.

Cheers for the help :smiley:

Glad i was able to help you (: