Hi there,
I’m struggling with a wired variable behavior. This is bed configurator. There is a studio scene and 2 .gltf scenes (bed 160cm and bed 200cm). Primarly it loads .gltf with 160cm bed and swaps with 200cm bed if button (html) is triggered. Here is a scenario how it works right now:
1. Main scene is loaded and appended with SLF24_bed_160.gltf
2. It sets few variables (for now just focus on hdb_type variable – hdb_type=0)
3. It checks what is the state of this variable and if it’s equal to the initial value it calls procedure “show_button_headboard” (there are 5 headboard types). So far so good.
4. When I click on a button with id=”size_200″ it unloads currently imported .gltf and loads SLF24_bed_200.gltf
5. Then it rechecks all variables (intact!) and calls procedures accordingly to variable values.
6. but… if I press button with id=”size_200″ again (or “size_160” if 160cm .gltf is currently loaded) all headboard unhides just like all procedures were called simultaneously.
It doesn’t happen if I switch between 160 and 200 .gltf’s. Only If I trigger a button “size_200” when gltf with 200cm bed is loaded or “size_160” when gltf with 160cm bed is loaded.
It looks like procedure definition executes itself without even calling it.
What’s wrong?
All the best,
Krzysztof.
Attachments:
You must be
logged in to view attached files.