This video revises again the concept of objects and shows you how to create talking person, with sound and movement of the mouth.

Here is a code snippet for this, and a short description on how to create it:

  1. Add it as a procedure to the biped class, so that you can use it for all your bipeds later. For this, go the Code Editor, select the yellow hexagone at the top beside the Scene tab, and then select “Add Biped Procedure” after choosing “Biped”. in the example below the procedure is called “moveMouthToTalk()”.
  2. Next click the “this” biped above the Procedures/Functions tab on the left and by clicking and then hovering select the SBipedJoint mouth. This gives you access to all procedures and functions available for the mouth.
  3. Next drag and drop two turn method blocks on the left under “do in order” and change the parameters as shown in the screenshot below. You are now done with the mouth movements.
  4. That’s it, you have created the moveMouthToTalk procedure. In order to use it, you need to call it from within the myFirstMethod(). Make sure that you select the correct character that you want to sing and use “do in order” and “do together” blocks properly nested.

181210 moveMouthToTalk.jpg

print