Dynamic component

Hi! I am trying to set dynamic components to move and animate stuff like as seen in the demo of the cliff house, it would be useful to have access to the configuration of the attributes, i dont tknow if its possible or where can i find it. If its not possible, i accept any suggestions on this subject, is it made with onclick attributes? thanks!

Hi!

Dynamic components can be set in two ways:

  • In VR Sketch, you can use the “Animation”“Interact” tool. Look in the context menu, with the B button: there is a command to set or edit the animation of the component on which you click. This lets you animate any component in a simple way, i.e. only a simple sliding or rotating movement between two positions. This is enough to set up sliding windows, drawers and cupboards as in the cliff house demo.

  • Sketchup itself supports more complex animations, which are indeed done by setting the “onclick” dynamic component attribute in any version of Sketchup Pro (not in Sketchup Make 2017). I’d suggest to use google to find tutorials about how to do that in Sketchup. VR Sketch should then pick up the same animation after you’ve set it up and tested it in Sketchup.

Don’t hesitate to ask for more details here if needed!

Armin Rigo

1 Like

Thanks for the explanation Armin! So in the first example, so that the animation can make effect it bas to be setted previously, right? or i can animate any object/component? because i assume that for them to move, they have to be able to it based on the attributes configuration of the DC, i dont know if i understood that part correctly.

In VR Sketch, you can just pick the menu command for any component. (It’s actually the “Interact” tool and the menu command is “Add animation”; I misremembered the exact names above, sorry about that.) It automatically takes care of making the component dynamic by adding the right “onclick” attribute in the Sketchup model.

1 Like

Awesome! I am going to try! thanks!

Hi again! I tried to make some on click animation on components and it worked magnificently, for real, its amazing! But i wasnt able to do the other option you talked about with the interact tool on components that are not animated. :frowning:

The other option I talked about is to do it completely in Sketchup, without VR Sketch. It’s quite a bit more complicated, but you can do more if you need it. If you are interested, you can follow some tutorials from https://www.google.com/search?q=sketchup+dynamic+components.

Hello again! i know how to edit and programate a DC in sketchup, the thing is i dont get it how to do it in VR haha,

In addition, with the DC i have animatd and setted in SKP, when i try to interact with them only with my hands it gets confusing with teleport, am i doing something wrong?

In VR Sketch you can only directly make simple animations. For complex animations you need to set them up in Sketchup as normal Sketchup-style dynamic components. Then these dynamic components will also work in VR Sketch, but you cannot make them in VR Sketch.

To make simple animations in VR, as I said above, use the “Interact” tool (it’s one of the many tools in the toolbar, “A” button). Then point to a component with that Interact tool and bring the context menu (“B” button) and pick “Add animation”.

Sorry if you already got that but are asking about something else…

About the hands: it’s very experimental. At least a couple of years ago when we added hand support the headsets were rather bad at tracking hands, and it was not very usable. We should probably check again the current status of hand tracking. The point is that VR Sketch is not really made for hand tracking in the first place.

1 Like

Hi! Its me again, well i’ve tried the interact option and it worked! Also im made some Onlcick animated Dynamic components and tried to move then and it works nicely, congratulations on that!

However i have succeded in moving objecs only in simple On click animations, such as rotate on Axe X, move from one point to anothe on the same axe, and so, but as soon as i start to make them more complex, like move from X:1/Y:3 to X:4/Y:5 i get the sign “complex animation, cannot drag”. I wonder if its not developed yet or if its an issue of my device.

I am aware that i can click on interact and it moves as it should, but my principal interest is the “drag” part

Hi,

Yes, that’s a current limitation. You can only “drag” simple animations, which have an ‘onclick’ that changes just one of the variables X, Y, Z, RotX, RotY or RotZ. For anything more complex, you can only click on interact and see it move.

Maybe it’s something we can fix, but it’s a bit involved. Complex animations can contain arbitrary formulas. If you drag the component to a given position, we have to compute which value to give to the ‘onclick’ variable so that the component animates at a position as close as possible to your drag. That’s impossible to do in general, because the formulas can be arbitrary. Maybe we can approximate a solution, e.g. find incrementally closer and closer values for the ‘onclick’ variable that makes the component animate to a closer and closer position as where you drag.

In the meantime, if you want a simple straight-line animation from X:1/Y:1 to X:4/Y:5, you can change the coordinates so that it becomes a simple animation changing only Y, for example.

I get it, absolutely, it would be completely unfathomable to program, but on the other hand i see that the move feature works beautifully, but only working with the PC, as i see, the objects and components cannot be modified or access tot he move tools etc if you use the file from the cloud, am i right? maybe it would be usefull instead of all this intricate path, to have access to move the objects from a file charged from the cloud, as i have experienced is much more easy to charge everytime, and then download ir again if there has been changes, i dont know if i explained my self.

Sorry for the delay in my answer!

Yes, the cloud models cannot be modified after you upload it. You can neither move stuff around, nor add an animation to a component. You can only temporarily move a pre-animated component, because that can be done without uploading any changes. I see a bit your point, though: you’d like to add a temporary animation to a component, just so that you can animate it, even though the new animation would not be saved anywhere and would be lost as soon as you close the model; is that right?

Not really, what i meant is that it would be useful to have access to the tool move on a file open from the cloud, of course i dont know the implications that this could mean.

That’s not possible in the current state: the cloud models are read-only and cannot be modified. Even if we changed our server to allow changes, we’d have the additional problem that, so far, changes done in VR are all forwarded to an actual, running Sketchup somewhere and done by that Sketchup. With cloud models, there is no Sketchup.

We’re thinking about changing all that to a different model which is less tied to Sketchup, but that’s future work.

For now you should investigate the use of the “Collaborative editing” command instead of cloud models.