Author Topic: Animation synchronized  (Read 2586 times)

totalboffin

  • Guest
Animation synchronized
« on: March 19, 2013, 09:35:07 AM »
Just wondered if there was any easy way to keep characters animations synchronized, I thinking of using the mecanim system and would be interested to find out thoughts on how to achieve nice smooth animation synchronization.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Animation synchronized
« Reply #1 on: March 19, 2013, 09:49:56 PM »
I don't know enough about mecanim to give a suggestion here.

broknecho

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 33
    • View Profile
Re: Animation synchronized
« Reply #2 on: March 20, 2013, 03:32:06 PM »
@totalboffin: Is there a way with mecanim to change the current animation given a string?  If so, you could sync a property like:

  1. string CurrentAnimationName { get; set; }
  2.  
  3. [RFC]
  4. void SetCurrentAnimationName(string currentAnimationName){ ... }
  5.  
  6. //When you determine what animation is the correct one
  7. tno.Send("SetCurrentAnimationName", Target.AllSaved, "TheCorrectAnimationName");
  8.  
  9. //Somewhere else pseudo code
  10. mecanim Set Current Animation to CurrentAnimationName
  11.  
  12.  

So to sum that up, just sync what animation your object is supposed to be in.  Once you have the current animation, you should just be able to get mecanim to interpolate to the new animation thus having it synced over each client.

I also don't use mecanim so this is all theory.