-
Hi! I can achieve this by caching the original dimensions of the model with a thin wrapper around MV and expose a setDimensions method that will ultimately change the scale parameter of each dimension to match. This works without a hitch. The issue is with Hotspots, if you had previously placed hotspots on the editor and then go and change the height, the hotspots remain anchored where they were. I've tried providing both a surface and a position and normal and (undenstandably) this doesn't work. My question is, how can I compute the transformation that would be needed to be done to the hotpsots position in order to "rescale" them, ie, place them on the same part of the model as it was prior to changing the scale? Intuitively I'd think the surface approach won't work at all and that I should be able to scale the position by the same amount as the model itself on that dimension but it hasn't worked for me... Any pointers?? Thanks a lot again for this amazing resource! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
Ok, I've solved it. As always the issue was behind the keyboard.
I'll share my approach here in case it is useful for someone, assume the model-viewer starts without any scale (1 1 1):
modelViewer.getDimensions()
positionAndNormalFromPoint
.