I have a strange problem, I load a model using a gltf loader, and within the loader I save the object to a local variable.
However when implementing a mouseover and mouseout, It does not work as Domevents thinks that the object is still the empty variable..
I get it running when setting a "dummy object" in the variable, and later update it, but then domevents raycasts the "dummy" object and not the real one that was added to the scene...
How can I save an object into a variable that Domevents gets always the updated object to raycast?
I have a strange problem, I load a model using a gltf loader, and within the loader I save the object to a local variable.
However when implementing a mouseover and mouseout, It does not work as Domevents thinks that the object is still the empty variable..
I get it running when setting a "dummy object" in the variable, and later update it, but then domevents raycasts the "dummy" object and not the real one that was added to the scene...
How can I save an object into a variable that Domevents gets always the updated object to raycast?