How to make Character model hidden?

So how can I make character’s model hidden when a button is pressed, but still cast a shadow?

Or even better, how can I just make head part of character model hidden when a button is presses, but still cast a shadow.


Hey Knovolt,

In your Player Controller (or wherever you are receiving input for your character), you can use Set Hidden in Game node to toggle whether a Component is hidden during play. You could set up something like this:

This will Cast to character Blueprint, get component you want (in your case, your Head mesh), and set it Hidden. I’m using a Bool variable (default value as false) and setting its negative every time, so while H is pressed mesh is hidden, and when H is released it becomes visible again.

You can decide whether an Actor or Component casts a shadow while Hidden. In this case, I found mesh component of my character’s Blueprint and scrolled down to Lighting in Details panel. If you expand that section, you’ll find Cast Hidden Shadow. Enable that, and a shadow will be cast whether it is hidden in game or not.


Hope that helps!

Thanks. But, when I hit play and press my designated key, it works and all but after a while shadow stops animating. It still casts shadow but soon after it stops animating and freezes.

And when I press “S” key to turn walk backwards, shadow turns around, but camera doesn’t.

(Note: aforementioned issues happen even when I uncheck “Visible” box in “MyCharacter” defaults.)

And how do I just link it to head, I still want my hands for example to be visible. Could this be that I didn’t have mesh as target? I couldn’t seem to get it up…

Here’s blueprint I got so far.
I’m so very stuck with this, thank you.

Hm, I’m seeing same thing with shadows pausing after a bit. I’ll enter a bug report for that and see what developers say.

It looks like you’re setting this up in your Character Blueprint, so you can skip Casting step. In image above, you’re casting to yourself, which is unnecessary. Instead, just call Hidden in Game node directly off mesh you want to hide. If you only want to hide a certain portion of mesh, you’ll need to have mesh split into several components. If you look at FPS template, you can see how this is done: there is a mesh for full body and a separate mesh for just arms. There is also a checkbox in Rendering section of a mesh component’s details for Owner No See; this is how hiding mesh from player is handled in multiplayer games.

Is that what you’re attempting to do here? To switch from a third person to a first person perspective? I’m not exactly clear on what issue you’re running into when you press S, or how you have your camera set up.

Okay, I’ll go look at FPS template and see how it works. But what do I type to search for “target mesh”.

And yeah, I’m trying to do a fp to tp perspective, but head either clips into camera or I can see entire head/neck when I run. But, now shadow seems to be working fine? Maybe I had to exit/relaunch editor?

By pressing “S”, shadow turns around and faces backwards, but camera does not change (in first person). Shown here:


I tried having a angle limit on yaw, and it works nice, but when I press “S” it spins camera around abruptly. So when holding down “S” camera spins in circles because blueprint makes camera spin when it goes pass limits.

In your video you are no longer hiding mesh, so that’s why shadow isn’t showing that bug.

You might want to open a new thread on forums or here on AnswerHub for how to switch from third to first person and back, as there are a number of possibilities there and I’m sure community has some answers for you. problem you have with S turning your character around is that controls are still set for third person, in which character can run towards camera rather than run backwards. You’ll need to switch to a control setup more suitable for a first person perspective.

You might consider setting up a second Player Controller Class with controls similar to those you can find in First Person template. Then you can cast to your Game Mode and set Player Controller Class when appropriate.

Hope that helps!

In 4.9 animation still stops when a character’s visibility is turned off or when it is set as hidden in game. Is it intended or a bug?

Hi Nox,

Please open a new post in Bug Reports section with as many details as you can provide and we can look into it there. Thanks!