I have a drawer with very heavy props inside. Basically, I want the props to become invisible when the drawer is closed, and become visible as soon as its interacted with. This would be easy, but i have a matinee actor animating the drawer. To cut a long story short i really need the visibility to be set to off to when its in the default position, and any other time it needs to be on.
Is that possible. Im assuming with Get actor location node, but i cant figure out a good way to implement it.
Thanks for the help
Consider animating that behavior with custom events. You can then use the same custom events to toggle visibility via Set Actor Hidden In Game. Better yet, reconsider needing to toggle visibility at all. Keep in mind that you do not waste rendering cycles because the game will automatically apply ambient occlusion. Until such time as the player opens the draw, the contents will not be rendered anyway due to AO.
If this is a multiplayer scenario and you’re concerned with hackers, visibility won’t do anything anyway and you’re approaching this entirely wrong - you will have to go back to my first suggestion.
Thanks for the considered response. This is actually a demo for an event showing off some design work, its really very basic im not worried about networking or hackers etc. The only thing I’m concerned about really is poly count affecting the VR headset. Rendering is fine, but it just makes things run a bit smoother if those objects are hidden at the beginning of play until interacted with. Its more of a poly-count issue than anything else.
I hope i didn’t miss understand your comments. What i was looking for really was a way to take those poly’s out of being processed until/unless they are needed. I was thinking perhaps LOD’s could work, but what i really wanted was “when actor is in this position, set visibility off, otherwise, set visibility on” would you know the blueprint nodes for that sequence?
Thanks again for the help
Have a look at this video, Tim Hobson explains how Occlusion Culling works in Unreal Engine. TLDR - UE4 does not render polygons that cannot be seen by the player. So if you are concerned about performance, don’t be. Hiding the mesh will not do anything, because it’s already not being rendered. UE4 is pretty smart like that. Watch the video for full explanation and console commands that can help you validate that. If you still have a problem, reply here and we’ll look at your real problem.
Some people relentlessly pursue questions to problems that only exist in their heads. In answer to your very specific question - yes, you can control visibility via actor’s location. You can create a Blueprint and add logic to use Get Actor Location on Event Tick. But I warn you, you will be trading CPU cycles (this would be performed dozens/hundreds of times every second for every such actor. It is far from clear as to which would be worse. First watch the video and validate whether or not you have a problem in the first place. Don’t over engineer something you don’t need to worry about. Premature optimization is a recipe for disaster
Ah i follow you now! In that case, that is VERY helpful indeed. Thanks so much for the help.
You’re welcome. If you’re happy with the answer, please mark your question as answered. This will help other people who are looking for unanswered questions.