How-To Hide anything that enters a certain area/space/volume?

Hi guys,

I’m working on a prototype for a game, and basically my problem is, I need to make certain players/objects/things invisible to other players.

Think of a transparent space-ship, with players inside, but you can’t see them. However the players inside the ship can see through the transparency of the ship and are able to see other players.

I’m new to UE4. Any help would be greatly appreciated.

Regards,
plorax

In the details of the object you can click hidden… If you want it to be a event as in the player walks around the corner and something appears behind them then you will need to work out a bp for that… I haven’t really gotten to far still struggling with the ground, but those are the options I know about.

Well try playing with the Visibility variable

Basic Example here
Create a cube mesh in the lvl then click on it and on the Details pane (on the right) uncheck visibility
Create a trigger box in front of it
Right click on the trigger box and at the bottom choose set Event and choose OnActorBeginOverlap
It will open your Lvl Blueprint
OnActorBeginOverlap Set visibility on the target Cube and check the new visibility box
then
OnActorEndOverlap Set visibility on the target Cube and uncheck the new visibility box

This way the cube will appear when the actor walk over the trigger box and will disappear when the actor walk out of the trigger box (your entire ship could be the trigger box)

Like this (I suck at explaining)

13c8cdf2bdf734be112235c2bdcca1a783d0e69d.jpeg

You can then work from that and try to create what you want… very basic stuff but thats all I have

What he said :slight_smile:

Lol @ Drixil

Thanks guys, I will try that! Will let you know how it turns out :slight_smile:

I’m wanting to know about this too. Anyone know how to make a mesh appear as a fade in?

The way I’ve approached this in the past is with a transparent material instance. Make a dynamic instance, and on the event update visibility (named scalar parameter from the material) based via a timeline.

Ah, sounds like what I’ve been trying. Didn’t work, I think because I’ve over complicated it by containing it all within a blueprint. So I think going to basics as shown above is the best place to start.

Would have been nice to be able to timeline visibility from 0 to 1 to get a Fade in Fade out

You can with a material instance. set a float track, 0-1 over time, have it set a scalar parameter on the material instance on update to fade in. trigger the “reverse” slot to fade back out.

Still having problems with this. Have tried linking this to a colour parameter and it works but just not with alpha. Can anyone see what I’m doing wrong here? Just want to approach an invisible material and have a trigger make it appear.

You want a scalar parameter value as the parameter group states - you are currently using a vector, which it wont read.
It worked for colour, because your colour is a vector parameter.
Also, if you are snapping it to 0 opacity… why not just hide it instead, it will be cheaper to render.

Ok, using scale parameter.

  1. At the start the mesh is 0 opacity which is good. Upon entering trigger it fades to 1 which is good but on stepping out it sort of fades to 0.1, it’s still faintly there?
  2. The object is glowing? I’ve disabled emissive. Also it glows brighter the closer I get to it. No idea why.

Hi there.

I have a question related to this i have an object that is pretty big and only want it shown when the player goes to a window otherwise it is hidden so i have added a trigger and scaled this so as the player walks up to the window the mesh appears outside this works ok.

My problem is if i have to players and Player 1 is in the Trigger and Player 2 is out of the trigger it shows the mesh all the time how do i get this work so if a plyer is outside it shows it for that player but not for the player inside the trigger still

any help would be great thank you.

Are you sure that your timeline is correct? Not keys outside the time range etc.