cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

how can i add a button to reset the scale of a model or lock the scale of a model?

JL_18346
11-Garnet

how can i add a button to reset the scale of a model or lock the scale of a model?

I have a spatial experience.  when the experience is viewed, the model is inadvertently scaled.

I'd like to add a button to reset the scale back to 1 or better yet, lock the scale.

any thoughts?

1 ACCEPTED SOLUTION

Accepted Solutions

I just realised the answer.  For a spatial tracking experience, create a button or something that when I click, it binds to the Spatial Target and use the reset gesture changes service:

Clipboard01.png

This is in the Spatial Tracking example that comes with studio.

View solution in original post

6 REPLIES 6
ytella
17-Peridot
(To:JL_18346)

Hi James,

Following is one of the ways to scale the 3D model using a slider widget:

  • Click on 2D canvas, drag the slider widget on to the bottom panel and set the desired minimum and maximum values in the properties section of slider widget as shown below:

  • Also, set the default value in the Value field (for example, set it to 1).
  • Now bind the value property from Slider properties section to the model in the VIEWS -> Home -> 3D container->{your 3D Model} section and select scale option in the properties field as shown below:

  • Save and Publish the experience.
  • In the view, scan the ThingMark and notice a slider bar in the device. Now, slide the bar to the desired value as shown below:

Please let me know if this is what you are looking for.

JL_18346
11-Garnet
(To:ytella)

Thanks for your reply.

This works great for a thingmark-based experience, but for some reason, not for a spatial experience.

I added a slider widget and bound it to the scale of the model, but when viewing the experience, it has no affect.

Ideally, I'd like to lock the scale, or add a button, that when pushed, would reset the scale back to 1.

thanks for your help.

I'd also like to be able to lock the scale.  The new spatial tracking based experiences are great for showing off a product, but it would be really useful if there was a was to disable the ability to scale using gestures.  Usually, you want to show the product in the real world and be able to move it around on the surface, or spin it around, but always keep it true size.  The Amazon AR view is a perfect example of this: Introducing AR view - YouTube.

In Studio, I can uncheck Enable Gestures, but then I'm stuck with the model wherever I placed it.

Hi Yamini,

I've noticed that in the Spatial Tracking experiences available in the app gallery, they have a reset button that reset's the model scale back to 1.  The question is, how do we do this?

I just realised the answer.  For a spatial tracking experience, create a button or something that when I click, it binds to the Spatial Target and use the reset gesture changes service:

Clipboard01.png

This is in the Spatial Tracking example that comes with studio.

Thanks Allan, that works perfectly.

Top Tags