Hello. I've encountered a strange issue when trying to pass a hotspot as a parameter to my javascript function. Initially this was working fine when set up as follows:
<action name="move_hotspot" scope="local">
...
js(MoveHotspot(get(hotspot[get(caller.name)]));
</action>
When this gets to my js function, MoveHotspot(hotspot), hotspot is passed correctly as an object with ath, atv, linkedscene all as properties which I can access.
I rearranged my javascript to stop using global scope so that now the function is called with VTourModule.MoveHotspot(hotspot) instead of MoveHotspot(hotspot);
Here's the action code.
<action name="move_hotspot" scope="local">
...
js(VTourModule.MoveHotspot(get(hotspot[get(caller.name)]));
</action>
Now when my javascript function is called hotspot is just equal to the string "[object object]". This is the only change I've made and switching it back to the original action code causes it to work again.
Am I doing something wrong or is this some kind of bug? Any help would be much appreciated.
Thanks!