I'm making a vehicle configurator. How to change my object visibility using my widget buttons?

I’m making a vehicle configurator. I have a widget menu and that part works fine. What I need to figure out is how to change my object visibility using my widget buttons? I want to be able to click on the Ford button and have the Ford truck appear and the Chevy Truck to dissapear, etc. I am not a programmer, I’m trying to use blueprints to set this up, but I have had no luck. Please Help?!

To toggle the mesh visibility, I added a function to the base class for the child blueprints to flip the mesh visibility.

In your UI, retrieve the current vehicle your using, cast to the base class, and toggle the visibility.

Thank you for your quick reply! I really appreciate it. I have set up the vehicle blueprint just like it is above, but there must be something wrong with my widget blueprint, I click my widget button and nothing happens. I’m still new at blueprints. Any ideas?

The set node should be a get node. Delete it, drag out your variable while holding ctrl and then hook it up. Add a printstring to the cast failed pin also to determine if your cast is failing.

It is still not working. :(. Here are the screen shots for both blueprints.

Your checkboxes are backwards. If the branch is true you want to have the SetVisibility to false. And if the branch false, you want to set it to true.

And after your cast remove the failed from the ToggleVisibility pin, if you pass a bad reference on accident this will cause a crash.

Thank you for your help. Unfortunately, it still doesn’t work. I may have to look into doing interactive 3D widgets or something. I’ve tried so many different blueprints to try to get this to work including the one you provided and nothing seems to work. It looks like I may have to approach it differently.

When I get home this evening, I’ll put together a small project that does what your trying to do and you can take a look at it. You can get this working.

You are awesome! Thank you so much for trying to help me figure this out. I know it must be something simple I’m missing. It shouldn’t be this hard for me to get it to work. I really do appreciate it.

I’m using version 4.17.1

You’re welcome. And yeah, unfortunately even after 30 years programming, we all sti.get something difficult. I won’t lie to you about that. You just kinda learn to accept it as part of the joy when you accomplish the task.

But which engine are you using so I make it in the right one?

Sorry, I already made it in 16.3

It should be the same regardless of version. It’s uploading to my Dropbox now. As soon as it is up, I’ll send the link so you can pull it.

This is the whole project.

I created a base actor class with a skeletal mesh component and then three children, one for each mesh.

In the level blueprint, I spawned one actor of each. I then created a set of functions to set visibility on each mesh individually and as a group. In the game mode blueprint (gmMain) I created event dispatchers to carry the UMG clicks to the level blueprint to show and hide each mesh when you click a button in the HUD.

Hopefully this helps to get you going. If not, feel free to ask.

Thank you very much! I have received the project and I will take a closer look at it tomorrow evening after work and see if I can get it to work with mine. I’ll let you know how it goes.

So, when I open your project and preview it, nothing works and the widget doesn’t show. I’m wondering if it is the version of UE4 that I am using. I’m going to try an earlier version and see if that is the issue.

I finally got it working! Thank you so much again for all of your help!

Congratulations! Glad I could help. Wishing you the best in your journeys.

Hello, My name is . I’m a 3D animation specialist from Kazakhstan. I saw your “configurator car” and the other works, I liked it so much, well done. That’s why I want to study work like you. Can you send me “configurator project” for study, please. I want to learn it and work in this direction. Thank you.
with best regards. .
My email: