We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

hide object on load / startUp

Home Forums General Questions hide object on load / startUp

Viewing 15 posts - 1 through 15 (of 26 total)
  • Author
    Posts
  • #70954
    Claas
    Participant

    hi all

    sorry for asking my google search did not show me an answer

    how can I set up puzzle to hide an object when the scene is loaded
    so when I click an trigger object the hidden object can be shown?

    #70955
    xeon
    Customer

    just place a hide object puzzle at the start of your puzzles.
    then add a show puzzle to the when clicked puzzle for the object you want to make it appear.

    demo: https://v3d.net/pjh

    The image below shows how I typically start a project:

    The first thing are two comments:
    Version of the 3D software and version of Verge3D that I am using.

    The next thing is my initial procedure.
    I place items in this that only need to be defined, set or initialized the very first time the application loads. In my use cases this differs from a reset function that I may have that resets the scene to the beginning similar to a initialize but doesn’t require reloading of assets.

    Although the contents of the procedure could be placed outside a procedure I like to keep things tidy and not have erroneous puzzles laying about that can be executed out of the intended order so for me … everything must be in a procedure or event trigger as quicky as possible.

    Inside the procedure…the first puzzle is the hide puzzle. In this example it hides the cube.
    The next thing I do is define the camera (optional) and make sure the camera is at the starting location and looking at the specified item (optional). If you ever opened up the AppManager and your app and find you camera not where you expect. These are simple way to make sure that doesn’t happen.

    The next item is an event trigger in this case a When clicked puzzle for the Sphere object.
    It has the show puzzle that unhides the cube when the sphere is pressed.

    Thats it.

    Hope this helps.

    • This reply was modified 1 month, 3 weeks ago by xeon.
    • This reply was modified 1 month, 3 weeks ago by xeon.
    Attachments:
    You must be logged in to view attached files.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #70957
    Claas
    Participant

    Ah that way – thank.

    how can you trigger it being tuned off again

    what I added seems not to work turning it off.

    do I need to add a variable to define on off like I did with the animation?
    I struggle with rebuilding the same logic – the commands are different.

    Attachments:
    You must be logged in to view attached files.
    #70962
    xeon
    Customer

    There are a few approaches but this one is one of the most straight forward methods:

    Attachments:
    You must be logged in to view attached files.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #70964
    xeon
    Customer

    In reviewing your puzzles….you do not want to set your variables to something prior to entering a if statement ….. in your case the if statement is inside the when clicked puzzle…if you do this the variable will never be changed.

    • This reply was modified 1 month, 3 weeks ago by xeon.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #70968
    Claas
    Participant

    thank you for the quick help!!!

    #70974
    Claas
    Participant

    Hey Xeon

    I think I slowly start to better understand your comment.

    I was looking at the furniture configuration file and saw how they use a list to show hide parts

    see first attachment image

    – – – – – – – – – – – – – – – – – – – – – – –

    going back to my own work and looking at what you said – this is what I have right now
    so I should not set a state outside the “when click” puzzle module?

    look at the second image attachement

    I was also curious here how to better work with lists to shorten the lights on off task.
    in the end when I click a light all others should be off plus their error images should be gone.

    only the light clicks should show the light cone and error image.

    do I feel I am close but something I do seems not correct

    I am pretty new to all this :-(

    • This reply was modified 1 month, 3 weeks ago by Claas.
    • This reply was modified 1 month, 3 weeks ago by Claas.
    • This reply was modified 1 month, 3 weeks ago by Claas.
    Attachments:
    You must be logged in to view attached files.
    #70981
    xeon
    Customer

    You can try something like this:

    Just a word of advise….keep things as simple as possible- hanging or loose puzzles will be executed first so having them laying about your puzzle space and not grouped will at some point cause you grief trying to track down an offending puzzle. I also recommend putting those puzzles that you are initiallizing your scene into a puzzle…so you can control the flow of execution otherwise you have to worry about where vertically and horizontally you layout your puzzles as there is an execution order based on horizontal and vertical alignment. Needless to say that adds to the messiness of trying to debug something.

    Since you want everything off and just want things to turn on when an object is clicked you can simply your puzzles down.

    you actually don’t need the lightlist as I have it…its not needed but maybe something your scene required elsewhere.

    • This reply was modified 1 month, 3 weeks ago by xeon.
    Attachments:
    You must be logged in to view attached files.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #70984
    Claas
    Participant

    I was thinking about something like this too

    When I click on a button just hide everything and then show what you would lie to see

    Only issue is if I click the object again it should be turned off.

    That’s why i started to set their show hide status and use the if then system

    Monday I will do a sales pitch for a company to use verge as their authoring system

    But I can also have simply an all off button too.
    In the end this is more a tech demo of the workflow blender to verge

    Since they build all in blender anyway it is a logical choice and verge is just very easy to learn for people unlike unity etc.

    #70985
    xeon
    Customer

    Well… I think before we go round and round adding things after I supply a solution we should define all the requirements.

    Is this latest twist the only addition or are there others after this that need to be considered?

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #70986
    xeon
    Customer

    this is one way…but it assumes you want to toggle the WhenClicked event.

    Attachments:
    You must be logged in to view attached files.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #70991
    Claas
    Participant

    Well… I think before we go round and round adding things after I supply a solution we should define all the requirements.

    Just so you know I did copy each idea into my files to test – the input is highly appreciated.

    please understand that my repetitive / incremental questions are only because I am still learning it and with each step well would ask differently.

    but since you asked this is I think the ultimate goal:

    in the end all light cones or error images should be off when loading

    when I click one light objects the light cone and error message is displayed
    if I click the same light object again the cone and error is hidden

    if I l click a different light object the previously visible light cone and error is hidden
    and the new light cone and error image will be shown.

    and with one other UI button everything is turned off

    I am still trying to digest your comments and learn the logic behind puzzles
    while puzzles is pretty simple there is still some understanding needed to know what will do what

    • This reply was modified 1 month, 3 weeks ago by Claas.
    #70993
    kdv
    Participant

    when I click one light objects the light cone and error message is displayed
    if I click the same light object again the cone and error is hidden

    Just check visibility.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #70999
    xeon
    Customer

    KDV’s way works too.

    We have all been where you are, I get it and I am glad you have started your V3D journey so welcome.

    I apologize for my abruptness. Its Friday and I was trying to give you a speedy answer before heading out. Luckily this is a very simple solution with multiple right answers and hopefully you are on your way to completing your project.

    So for you addition piece requesting a UI button. Did you want this to be an HTML element or 3D object. For simplicity I am going to guess a 3D element. In this case add a new 3D element to your scene or select an element you want to be your UI element and create a when clicked puzzle for it too. Inside that puzzle, just add a hide puzzle with the varialble hidelist to hide everything. If you are using the visible state variable method then add a set visible state variable puzzle to false.

    If you are new to object oriented programming or programming in general this can be pretty confusing. If you find yourself in a bind you can reach me at xeons3dlab [ at ] gmail [ dot ] com.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #71008
    Claas
    Participant

    nothing to apologize for

    since adding HTML is now so easy were are thinking of maybe use HTML buttons for some interactions.

    but for Monday I think I will use mesh objects to make the UI because that’s currently faster for me.

    I will tonight get working on this as yesterday evening I learned how to make a custom pre-loader.

Viewing 15 posts - 1 through 15 (of 26 total)
  • You must be logged in to reply to this topic.