03 March

Animating Dynamic Components

Written by 

Dynamic Components Attribute Dialog BoxBeing able to open doors and windows interactively inside your Sketchup model can give you a better understanding of sightlines between internal rooms while delivering that extra “wow factor” to a presentation. In this tip I show you how to animate objects like these in your 3d model with a simple click of a button by using embedded commands inside your components.

Dynamic components can be used to assign pre-programmed commands and operations to an object, allowing it to change within a set of customisable rules. You can add dynamic properties to any components that you make and in this video I look at the ANIMATE command that works when inserted as an onClick behaviour.

In the video I go through programming a basic swing and sliding door and then use the interact tool to execute the functions. There is a little bit of pseudo coding involved which can turn people off, but this example is very basic and the steps I go through here can be followed by anyone.

It should be noted also that there are a couple of bugs in the dynamic component plugin which can be a bit of a nuisance and I point these out in the video.

The onClick commands that I use are:

ANIMATE(“RotZ”,0,90) - Rotates our object around its origin axis by 90 degrees and then returns it back to the 0 degrees state with a subsequent click.

ANIMATE(“X”,0,-86) - Moves our object from its origin axis minus 86 centimetres along the X axis and then returns it back to its previous state with a subsequent click.

You can also create multiple command combinations, ie. rotate and move together, by separating each command with a semi-colon (;) inside the dialog box.

Watch the video and then have a go yourself!

If you have access to my intermediate online courses, there is a bonus video about animating with dynamic components that goes much further and has an example file that you can download!

Read 246 times Last modified on Friday, 01 June 2018 07:17
Rate this item
(0 votes)

Subscribe to our Newsletter

Get all of the news, new hints & tips, special offers and course dates emailed to you!