Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ermak on June 24, 2016, 02:44:53 PM

Title: Playmaker 1.8.1 - Set Animator IK Goal working?[Question]
Post by: ermak on June 24, 2016, 02:44:53 PM
Hello,
Can someone confirm "Set Animator IK Goal" works on Playmaker 1.8.1?
I get this error:
Setting and getting IK Goals, Lookat and BoneLocalRotation should only be done in OnAnimatorIK or OnStateIK

I know, now "Animator" actions are built-in v1.8.1. But before everything was fine:
https://github.com/jeanfabre/PlayMaker--Unity--Animator_U4-SubModule-/blob/master/Changelog.md
https://hutonggames.fogbugz.com/?W1031

I am with Unity 5.3.4 and I test this in new project.

This is the difference between scripts:
https://www.diffchecker.com/bwebx8nr

Left Side:
Built-In action in Playmaker 1.8.1


RIght Side:
v1.1.6 from here:
https://github.com/jeanfabre/PlayMaker--Unity--Animator_U4-SubModule-/blob/master/Changelog.md
Before Playmaker 1.8.1
Title: Re: Playmaker 1.8.1 - Set Animator IK Goal working?
Post by: j1knight5 on June 29, 2016, 06:36:09 PM
Glad to see this isn't just me finding this as an issue..

I'm currently not seeing any in-game result / change in the object I'm trying adjust the IK Control on (ie the Prefab character's hand isn't pointing forward at the child object with the Set Animator IK Goal FSM) - it just remains idle)

I was pulling my hair outta my head thinking this was something I did wrong..

Title: Re: Playmaker 1.8.1 - Set Animator IK Goal working?
Post by: jeanfabre on June 30, 2016, 07:35:09 AM
Hi,

 ok, let me wrap the demo I did with the old version of Animator support for PlayMaker. Last time I checked animator IK control it was working ( like 2 weeks ago). but maybe I overlooked something.

Thanks for letting me know, it's very important, always ask if something doesn't seem to work, don't spend too much time pulling your hair out. It's good to keep trying to find a solution, but ask meanwhile.


Bye,

 Jean
Title: Re: Playmaker 1.8.1 - Set Animator IK Goal working?
Post by: jeanfabre on July 01, 2016, 05:34:46 AM
Hi,

 Ok, I made a sample on the Ecosystem (http://j.mp/PlayMakerEcosystem) showing the IK controls.

(http://i.imgur.com/N2n8QbC.gif)

(http://i.imgur.com/jsTUMvG.png)

Bye,

 Jean



Title: Re: Playmaker 1.8.1 - Set Animator IK Goal working?
Post by: ermak on July 01, 2016, 03:45:39 PM
Thanks! Your sample works fine!

Again this:
Setting and getting IK Goals, Lookat and BoneLocalRotation should only be done in OnAnimatorIK or OnStateIK
but this is just a warning (not error).... can work with that without problems.

Only one note. The problem was not in built-in action: "Set Animator IK Goal".
You must have "Set Animator Body" action... somewhere in the FSM.
No matter is "On" or "Off". No matter in which "State (box)".

Example Video Link:
Title: Re: Playmaker 1.8.1 - Set Animator IK Goal working?
Post by: jeanfabre on July 01, 2016, 05:10:02 PM
Hi,

Your video helped me understand the root of the problem. I'll update the actions,
thanks :)

 Bye,

 Jean
Title: Re: Playmaker 1.8.1 - Set Animator IK Goal working?
Post by: jeanfabre on July 04, 2016, 03:08:50 AM
Hi,

 Ok, I have updated the actions, they will be available in the next PlayMaker Update on the Asset store.

Get the package for the action fixes here:

http://hutonggames.com/playmakerforum/index.php?topic=13143.0

Bye,

 Jean


Title: Re: Playmaker 1.8.1 - Set Animator IK Goal working?[SOLVED]
Post by: ermak on July 04, 2016, 04:57:44 AM
Thank you so much! Now working without "Set Animator Body". And this "Warning" disappeared:
Setting and getting IK Goals, Lookat and BoneLocalRotation should only be done in OnAnimatorIK or OnStateIK

But I have one more question.
"Set Animator IK Goal" can work only on "OWNER" GameObject (with Animator Component)? Can't work on other GameObject?
For example I can have PARENT GameObject with all my FSMs there and one CHILD GameObject with Animator component there. And this not work.
Yes I can change my game logic to make it work (only on child)... but just I want to know - this is bug or not?

Example Video Link:
Title: Re: Playmaker 1.8.1 - Set Animator IK Goal working?[SOLVED]
Post by: ermak on July 06, 2016, 02:51:09 AM
BUMP

So... I must use it only on "Owner"? It's not possible to use "Set Animator IK Goal" on other game object?
Title: Re: Playmaker 1.8.1 - Set Animator IK Goal working?[Question]
Post by: jeanfabre on July 06, 2016, 04:19:57 AM
Hi,
 
It looks like a bug yes, it should work. I'll investigate.

 Bye,

 Jean
Title: Re: Playmaker 1.8.1 - Set Animator IK Goal working?[Question]
Post by: ermak on July 13, 2016, 03:24:56 AM
ok , I'll waiting :)
Title: Re: Playmaker 1.8.1 - Set Animator IK Goal working?[Question]
Post by: jeanfabre on July 21, 2016, 03:08:42 AM
Hi,

 So yes, it is currently a problem. Only owner works, we are going to look at how to solve this case, it's tricky, because the action expected a callback that only happens on the gameobject featuring the Animator, so I am not sure too sure how to solve this right now.

Bye,

 Jean
Title: Re: Playmaker 1.8.1 - Set Animator IK Goal working?[Question]
Post by: asenyour on August 31, 2016, 03:22:23 PM
Hi
I'm using the latest Ver. of PlayMaker & Unity and I'm still having the same problem, this hasn't been fixed yet, if it has what is the fix???
Title: Re: Playmaker 1.8.1 - Set Animator IK Goal working?[Question]
Post by: ermak on September 01, 2016, 03:01:33 AM
I changed my game logic to works only on OWNER gameObject when "Set Animator IK Goal" is used. It's not a big problem... (with send events) but will be good idea to mention in action description - "only working on owner".
Title: Re: Playmaker 1.8.1 - Set Animator IK Goal working?[Question]
Post by: jeanfabre on September 02, 2016, 01:35:38 AM
Hi,

 yes, we are trying to find the right way to solve this currently. The problem is the same with triggers and colliders for example.

Bye,

 Jean
Title: Re: Playmaker 1.8.1 - Set Animator IK Goal working?[Question]
Post by: asenyour on September 02, 2016, 11:44:11 AM
Thanks Jean
This seems to be a really persistent problem to be going on this long without a fix, and you don't have any other work around that would do a similar type of action?
Brian
Title: Re: Playmaker 1.8.1 - Set Animator IK Goal working?[Question]
Post by: jeanfabre on September 05, 2016, 04:29:39 AM
Hi,

There is a workaround :) The solution is to use the old proxy system and related actions.  It's still on the Ecosystem. Then them old actions do target any gameobject, they internaly add the necessary proxy to the gameobject and your action can get infos from an fsm that sits in another GameObject that is not the IK target.

Let me know if you struggle with this. When you'll import that ecosystem package it will overwrite the official actions, so you'll need to fiddle around. I would simply only import the actions you want to use ( GetAnimatorIKGoal) and leave other actions untouched.

 Bye,

 Jean