Chair Tutorial

Description

Any object in Twinity can be a chair. All you need to do is link sit down, idle and stand up animations to the object with Twml. You can use the standard animations provided in this example or build your own custom animations. In fact the chair object could be more accurately called object with attached avatar animations.

Twml options

Inside the Twml document you define the point where the animation should be attached (origin) and the attached begin, end and idle animations for male and female skeletons.

Twml example

<package caption="Chair" icon="icon.jpg">
  <description>Chair Sahra</description>
  <object path="chair.dae">
    <action caption="Seat" trigger="click" range="3.0">
      <origin position="0.0 0.0 -0.4" yaw="180" />
      <avatar_animation path="f_sitdown.dae" trigger="begin" 
        blend_in="200" blend_out="200" repeat="1" skeleton="female" />
      <avatar_animation path="f_standup.dae" trigger="end" 
        blend_in="200" blend_out="200" repeat="1" skeleton="female" />
      <avatar_animation path="f_siting.dae" trigger="idle" 
        blend_in="200" blend_out="200"  skeleton="female"/>
      <avatar_animation path="m_sitdown.dae" trigger="begin" 
        blend_in="200" blend_out="200" repeat="1" skeleton="male" />
      <avatar_animation path="m_standup.dae" trigger="end" 
        blend_in="200" blend_out="200" repeat="1" skeleton="male" />
      <avatar_animation path="m_siting.dae" trigger="idle" 
        blend_in="200" blend_out="200" skeleton="male" />
    </action>
  </object>
</package>

Preview