Trying to Hide / Unhide Object in Game Play

I am NOT a programmer at all and have very little understanding of Blueprints. I have been trying to do something that I thought was going to be pretty simple. I have an asset where the is a 3D figure mesh that I am applying a hologram material to it. I want to be able to have the mesh be invisible during game play and when I go to the screen at the holodeck, the figure shows up. I have watched a few tutorials and I have not been able to get this to work. Any help would be appreciated.

Your screenshot is of poor quality (Win Button + Shift + S is your friend), but I hope I understood what is going on. So, if you need to hide 0c1Audrey-Got3d1, it seems like you did everything OK. I would check if nodes 1, and 2 are executed. You can right click on node and then use option Add Breakpoint. More info can be found here: Blueprint Debugging Example | Unreal Engine 4.27 Documentation | Epic Developer Community

How to know if node gets executed? Run your game, and do what needs to be done to hide the object. Your project would pause, and editor will focus on the component during the runtime

  • If 1 does not get executed, your collision is not setup properly. Check your Box collision and make sure it ovelaps Character.
  • If node 1 is executed, but 2 is not, that means the cast failed.
  • If 2 gets executed, but you don’t see your changes, that means you are hiding the wrong component.

If you want to double check every execution, you can replace breakpoints with print string node that you will put between OnComponentBeginOverlap and Cast node, and between Cast node and SetCollisionEnabled node.

When you make it work, don’t forget to Right click and Remove breakpoint wherever you added it. Otherwise, your project will pause every time you invoke overlap.

This is super helpful. Actually, I want to UNHIDE or make visible the target object. I have the target currently set to “Hide During Game” so that when this executes, the target unhides when the player gets to the collision box. I then need to have it Hide again after they leave but I was going to figure that out after getting the first part right.

I am going to try now and will provide feedback. I think the problem might be the collision box. You made a good point there where I do not think the target is within that box.

Well, I tried to run again making sure collision box included the target object, Audrey, but I was unsuccessful. Sorry about low rez image, I used a screen capture but maybe rez is wrong. I have the collision box under audrey so it is attached to her. I tried a hide node in lieu of the visible node and that did not work. Someone had said to use that node and keep uncheck and it should make audrey visible. I included a short video showing the event graph as it is activated sine there is a red connector that flashes upon execution. I take it that means something is not working.

After trying the above, again, not knowing what I am doing but that red flashing node connection upon play bothered me. My thought is that meant the issue was with the first person character. When I press play, I am not sure I am actually using the first person character. I have another blueprint I created where a video with sound is projected on a static mesh and that triggers when when upon play, one enters the trigger box I set in front of the media element. I figured how is what I am trying to do now with Audrey not that simple so I figured I would try setting up the blueprint like that and see what happens. I used an event play node in lieu of the begin overlap node. well, when I hit play, the figure is unhidden right away. I figured that is now happening becasue of the event begin play node I used which is probably unhiding the object as soon as play begins. I will try using a trigger box in lieu of the collision box and see if I can get that to work.

I am an architect and 3dmodeller which is why I am so clueless on this. Sorry about that.

I figured it out. I think it was indeed the first person character and me trying to use that for my overlap node. I guess I do not understand when that is actually used when simulating game. Whatever, I got it to work by reverse engineering the video trigger box blueprint I did. My question would be what way is the best way to set these up if you are concerned about efficiency and draw calls. Thank you for your help and reply! It made me think a different way.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.