So now we have a very nice looking pencil that is levitating above the table. We could fool around rotating it and trying to move it to sit on the table, but let's not! Let's let Blender's physics engine set it on the table for us!
First, select your pencil object (it should be a single object if you did the last step of the last lesson). Now select the Logic button:
Change the settings as shown here:
Let's expain this. We press the 'Actor' button to tell the object to interact with other objects within the model. We change the object from static to rigid body to make it subject to gravity. We identify the bounds and ask Blender to use a Convex Hull to identify the bounds of the object when it interacts with other objects. If all of this means nothing, that's OK. We'll do more of this later on. Right now, we just want our pencil on the table.
Change the settings as shown here:
Let's expain this. We press the 'Actor' button to tell the object to interact with other objects within the model. We change the object from static to rigid body to make it subject to gravity. We identify the bounds and ask Blender to use a Convex Hull to identify the bounds of the object when it interacts with other objects. If all of this means nothing, that's OK. We'll do more of this later on. Right now, we just want our pencil on the table.
If you go to the side view (Numpad3) and tab into edit mode, you will notice a dotted circle near the tip of the pencil. This represents the center of gravity for the object:
Press 'a' to select all of your pencil and move it to center on the dotted circle (see the pink dot):
Let it Fall
Let it Fall
Ok, we got it ready to go. Want to watch your pencil fall and rock back and forth on the desktop? Press 'p'.
Pretty impressive, huh? Except that when we escape out of the animation our pencil is floating again, right? Let's fix that.
Go to the Game menu and choose Game>Record Games Physics to IPO. Split the window and make 1/2 of it an IPO window. Press 'p' again. When the pencil stops rocking, press the escape key.
Now the action we've just seen is recorded as an animation in our model. The curves in the IPO editor are showing motion in the X, Y, and Z axis. If we right click and drag our mouse in the IPO curve editor we can make the pencil move up and down.
Depending on how high your pencil was above your desk, at about frame 350 the IPO curve should stop. Right-click at the frame where the IPO lines become colored again. Press 'a' to select all IPO curves and press Delete. Confirm delete all. Now our pencil is sitting right on the desk! And it's not going to move until we tell it to.
No comments:
Post a Comment