Rotating dynamic components


#1

Is it possible to make a component rotate up and back down on the same click. For example i want to rotate a block by 45 and get it back to its original position, it opens and closes back.


#2

set up a counter
one can place conditions on the return values using if statements.
using the custom animate with a slower time

return.skp (16.8 KB)


#3

I have sketch up 14 n ur file us sketch up 15.


#4

no problem

return.skp (16.7 KB)


#5

Can’t it be smooth? I mean its jumping. N can u xplain 2 me the notation in the onclick box?


#6

sorry used some thawed logic, amended formula for RotZ

return.skp (16.7 KB)


#7

“N can u xplain 2 me the notation in the onclick box?”

http://help.sketchup.com/en/article/115754


#8

Amazing! Thanks. U know this more than 20 characters kind of irritating right? I mean you can’t even say thanks to someone :slight_smile:


#9

What should I change if i want to make it turn less than 90?


#10

You can use the function ANIMATESLOW(“RotX”,angle1,angle2) for the onclick event.
(See this example from @pcmoor s link)


#11

I assume it is in regards to the return example, where as Cotty is showing the standard two click example

angle =90
RotZ…=if(points>=90,180-points,points)
onClick…ANIMATECUSTOM(“points”,10,0,0,0,180)

basically change the 90 for the angle, and double it for return

say you want 70,
=if(points>=70,140-points,points)
ANIMATECUSTOM(“points”,10,0,0,0,140)

where you alter the time, now @ 10 to say a value of your choosing, the next two ease in / out values currently both @ 0, can be used to slow the initial movement of the “door” or final movement, the last set of values are the start and finish of the variable “points” being changed

or use the simpler
ANIMATESLOW(“points”,0,140) as nominated by Cotty

cheers

PS Make sure points is rewritten to 0 as 180 would be outside the new range, if you edit whilst this value is not 0


#12

thank you pcmoor. —


#13

pcmoor is right i asked the question in relation to a previous conversation


#14

thank you.----------


#15

Newbie alert!

I downloaded the skp file, but it just sits there. How do I run the animation, so I can see what you are talking about?

PLAY is greyed out in the Animation menu.


#16

When parts are animated in a dynamic component, you can watch them move when you use the Interact tool to click on the component. Animation menu starts an animation that cycles between scenes that have been defined in the model. It will be greyed out if the model has no scenes or only has one.

Anssi


#17

Ah. That appears to be in the Pro version only.

“Never mind.”
-Emily Litella


#18

You should read @Anssi’s answer a second time.


#19

I looked for information on the Interact Tool. That appears to be part of the Pro set.

Did I misunderstand? Can I access this from the free version?


#20

Yes, you can’t create new dynamic components with the MAKE version, but you can use the interact tool with it.