Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Animation judder  (Read 3443 times)

0 Members and 1 Guest are viewing this topic.

FogGobbler

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 228
    • View Profile
Animation judder
« on: February 25, 2009, 08:23:57 AM »

Hi, again!

I need your help again, sorry, guys.

I want my character to drink something, then hold the glas at his mouth, say "This is nice..." and then drop the hand with the glas.

So I´ve got three animations defined in my X file

drinkCoffee 0-30
holdCoffee 30-30 (looped = true)
dropCoffee 31-60

This is the code:

Code: WME Script
  1. actor.PlayAnim("drinkCoffee"); // move glas to mouth
  2. actor.PlayAnimAsync("holdCoffee"); // hold glas at mouth position
  3. Sleep(300);
  4. actor.Talk("Ahh");
  5. Sleep(2000);
  6. actor.PlayAnim("dropCoffee"); // drop hand

It works, but I get a nasty judder between the animations. Setting the transition doesn´t help  :(
Logged

FogGobbler

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 228
    • View Profile
Re: Animation judder
« Reply #1 on: February 25, 2009, 09:15:17 AM »

Okay, after doing some tests, I´ve found out how to solve the problem  ;D

Code: WME Script
  1. actor.PlayAnimAsync("drinkCoffee");
  2. actor.PlayAnimAsync("holdCoffee");
  3. Sleep(300);
  4. actor.Talk("Ahh");
  5. Sleep(2000);
  6. actor.PlayAnimAsync("dropCoffee");
  7. Sleep(1000);

It works with the AnimAsync animation method. Perhaps because the engine doesn´t try to go into idle mode, but carries on with the script commands?
Logged
 

Page created in 0.044 seconds with 21 queries.