this expression allows you to have a box tip over its corners and tumble, without the need to animate a pivot, or add a complicated rig. Of course, this method is not accurate, the box will always slide. But it is great hack if you need this get done fast, especially in previz!
The expression looks at the objects’ boundingbox and if one of its corners gets above or below 0.
If it does, it will force the z value of the bounding box to stay at 0.
nodeGetBoundingBox uses an object in the scene as its coordinate system. That way you can adjust your ‘ground’ to any worldspace position and any orientation.
watchout…python beginner crossing :)
Python looks at how much whitespace each line of code has on its left side. But I didn’t know that it likes spaces more than tabs. In Maya I would get this error from time to time:
‘unindent does not match any outer indentation level’:
But my code looked ok. Solution was to ‘reset’ all the indentations, because some consisted of spaces, others of tabs. A great way to do that is using Notepad++. It has two functions, one to convert existing TABs to SPACEs and one that translates TABs into SPACEs while you type…great tool :)
yay! Finally installed wordpress….and now I need to fill this empty space… for now you’ll have to live with my imdb profile :)