Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: wetcircuit on December 18, 2014, 02:22:14 PM

Title: newbie Q - FSM interferes with another FSM?
Post by: wetcircuit on December 18, 2014, 02:22:14 PM
first day with Playmaker, sorry for newbie question ??? Simple scene just to learn. I have a conflict(?) between 2 FSM controlling the same object.

FSM 1: GUI Vertical Slider with Set Rotation to set the X rotation of a Directional Light. (I'm using a local Float variable to get and set the value)

(http://www.3d.wetcircuit.com/wp-content/uploads/Screen-Shot-2014-12-18-at-1.37.48-PM.png)

FSM 2: ROTATE to spin the light on the Y axis. (local Float variable to set the value)

(http://www.3d.wetcircuit.com/wp-content/uploads/Screen-Shot-2014-12-18-at-1.40.09-PM.png)

In play mode, before I adjust the slider the light spins on its Y axis as expected, but once I adjust the slider the light stops spinning (as if the FSM 2 float variable is counting down to zero over a few seconds, in other words it doesn't abruptly stop, it winds down with momentum and stops).

If I drag the slider to the top and then bring it back down, the light will again rotate briefly before winding down to a stop.... If I don't touch the slider at all, the light rotates forever as expected.

I uploaded a webbuild here (sorry for the amateur test scene)
http://www.3d.wetcircuit.com/Unity3D/PlaymakerGUItest/PlaymakerGUItest.html (http://www.3d.wetcircuit.com/Unity3D/PlaymakerGUItest/PlaymakerGUItest.html)

I've tried setting up the slider FSM on the light itself, and also on the camera, but eitherway the behavior is the same... Adjusting the slider seems to interfere with the other FSM, but I don't know why.

Am I going about this the wrong way? Is there any "rule" about which game object GUI items should reside...? Or a "rule" about multiple FSMs controlling different aspects of the same object?

Thank you in advance.  :-[
Title: Re: newbie Q - FSM interferes with another FSM?
Post by: wetcircuit on December 19, 2014, 12:33:03 PM
Well, workaround is simple enough, simply move one of the FSM to a parent gameobject....

is that the "normal" workaround?