playMaker

Author Topic: Mecanim Coffee-talk  (Read 3496 times)

Red

  • Hero Member
  • *****
  • Posts: 563
Mecanim Coffee-talk
« on: June 10, 2013, 05:31:53 PM »
Anyone interested in a general Mecanim gabbing thread where we talk about anything Mecanim related (from questions to concepts to theories?)

If so, why not in a relatively centralized spot?

though, i would suspect that if there is a specific question related to a bug that might be better to have it's own thread (since the community here is good at having questions answered pretty quickly.) but for general stuff and non-specific-to-errors/issues maybe something here?

p.s. if you haven't made the switch, i'd like to recommend it highly... so far i have only scratched the surface and it's already so much easier to deal with than the previous system (which though capable, was a bit hard to understand in some cases.)

Kevron

  • Junior Playmaker
  • **
  • Posts: 51
Re: Mecanim Coffee-talk
« Reply #1 on: June 11, 2013, 05:15:38 AM »
Nice idea :)

Just trying out Mecanim combined with navmesh agent. I am building upon the demo that is available from unity. "Ported" to Playmaker here by Jean: https://hutonggames.fogbugz.com/default.asp?W1031

I have some challenges that I am hitting the wall on. First its how to fire off an event when a specific animation is done.

You are in "idle". Your character transition into "walk/run" and back to "idle" after a while. How could I tell "object A" to start "action A" when Character returns to idle state?

And the other challenge is to control what direction the character is facing after walking to a destination set with navmesh.

I am trying to do a classic point and click adventure, a bit like Sam & Max and walking dead. So when my character has the possibility to shoot at object A, I would want to manually control his position so that he turns and points toward Object A.

Any thoughts?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Mecanim Coffee-talk
« Reply #2 on: June 11, 2013, 05:42:15 AM »
Hi,

 listening to state changes should be done in a dedicated fsm,

study the prefab "Character PlayMaker Say HI" and its fsm "Jump", it does listen tot he state coming back to idle. That's how it's currently working.

I think Mecanim is cooking some event based system to be aware of this properly, it may improve in a near future.

bye,

 Jean

Kevron

  • Junior Playmaker
  • **
  • Posts: 51
Re: Mecanim Coffee-talk
« Reply #3 on: June 11, 2013, 08:43:40 AM »
Hi,

The "Get Animator Current State Info Is Name" did the trick. I tried it before, but failed to recognize that the correct way to write in the name files is not just "idle", but "Base Layer.Idle".

Still not sure how to solve the rotating bit. But thats more a Navmesh-issue, so I´ll try to keep this thread only around Mecanim.

Thanks!

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Mecanim Coffee-talk
« Reply #4 on: July 21, 2013, 09:03:49 PM »
Wow, I take a handful of weeks off and i see that this thread is still going and there's some golden stuff to learn from!

I'm going to have to look at that example... Sure i've got a system up but i can always benefit from studying other people's examples.

That said, if i have something to contribute in terms of files, how do i see about getting them hosted on the wiki? i'd understand if they would have to be vetted for quality and i'm okay with that (even if they're denied because i do understand that i'm learning as i go.)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Mecanim Coffee-talk
« Reply #5 on: July 28, 2013, 04:42:59 PM »
Hi,

 If you ask alex, I am pretty sure he will give you a wiki account for you to do it all by yourself. Your participation and input to the forum is obvious and of quality. you can always send the stuff to me, and I'll add it, and possibly comment on where you an improve before posting.

bye,

 Jean