How to hide a certain object in the model, for a product visualization?

Hello,
For a project I am working on, I have to make a 3D 360 degrees visualization of a ship. I need to add a button on the screen and by pressing it, a certain part of the hull to get hidden so the main engine of the ship to be seen.
I managed to import the model of this ship (as fbx, from Rhino) but being at the beginning with this software I don’t know if there is a script to hide an object (part of the hull) and how to connect the button with the scrip
2023-02-21 16_52_47-Window
.
I have added a screenshot of how it should look like.

Please, can you share any info or point me where I could get it?

Thank you for your time! Much appreciated!

Best regards,

Dragos82

Hi @Dragos82 and welcome!

You can add an attribute to your script and attach the entity you would disable on button click.

https://developer.playcanvas.com/en/user-manual/scripting/script-attributes/#entity-attribute

https://developer.playcanvas.com/en/tutorials/ui-elements-buttons/#button-events

// on click event
this.target.enabled = false;

Thank you Albertos!
I am totally new to this and I hope I will be able to figure out how to add the codes and get them to work!

All the best,

Dragos82