I am attatching a skp file with three unrelated componens. The first two were created without changing the axes, and the third created with the axes moved to the other end of the component. I then added to all three the exact same dynamic attribute: onClick → ANIMATESLOW(RotZ,0,90)
The first two bahave identically. The third does not behave at all. It doesn’t move. I’m expecting it to rotate about its Z axes. Is this a bug or am I misunderstanding axes positioning.test.skp (341.8 KB)
If I move the axes around on the “broken” component, some orientations work and others do not.
Also, can anyone explain the grave warning I get: “Changing a Dynamic Component’s axes can have a serious effect on your model”?
you flipped component5, y & x axis, Sketchup updated the values, the -180 attribute is in response to not being able to find -180 in your formula
to isolate the two axis systems place a component nesting between them before any flips or external rotations
Thank you so much for taking the time with this! Although yours works, I’ve tried about 10 times to reproduce it and always get the same problem. I think, more than anything, this is because I have no idea why I need to do what you are saying I should do. I don’t know what is trying to read the -180 nor do I know what creates the -180 value.
This is the series I do to match your outliner as best I can, but the -180 never matches yours:
create a rectangle box
make it a component
open the component and make the inner box a nested component.
set the onclick() attribute in the nested component (this now works with “interact”)
step back up to the outer component
change the axis alignment on the outer component
I would love to know if this is just a workaround for a bug or if it is something that I should try to understand.
this is the problem, you can flip or rotate, but changing the axis on the parent itself is the problem, you need a buffer between one axis system and the other. So for this case you would have another nesting.
Please note that this extra nesting has other uses, its required to create swap-able components that update to the current instance properties plus it can contain other data, geometry
Again, I really appreciate your having taken the time for a newbie here! I tried flipping and rotating and still get non-functional results. If I flip along the red axes, the rotation breaks exactly as when I move and reorient the axes…nothing happens and I get the -180 placed in one of the vars. If I rotate the component that has an animation set, “interact” actually rotates the component back to its original orientation before animating it.
But, I finally figured out how you made your nesting work. For anyone else caught in this anomoly, the trick is to nest as pcmoor suggested, then apply the axes change to BOTH the inner and outer components (that was the step I was missing), and finally add the animation to the inner nested component. That appears to work for me.