Odd FSM "ANY STATE" behavior

NodeCanvas Forums General Discussion Odd FSM "ANY STATE" behavior

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10581
    voiceafx
    Participant

    I’m using a FSM to control animation changes based on the velocity of a rigid body. My animations run using the Spine Unity Runtime, and not Mechanim – I only need to call a “Set Animation” function, which is non-blocking, on entry of each new state. See the attached image for details about how I’ve set it up.

    When I select “Dont Retrigger Running States,” in the “ANY STATE” block, the state machine will never transition away from the Idle state, even when the speed meets the transition requirements for the “Running” or “Walking” states. If on the other hand I leave “Don’t Retrigger” unchecked, it does transition properly, but it also re-enters the Idle state continuously, which is undesirable.

    It seems like the no trigger behavior is preventing the transition away from any active state. Any idea what is going on here?

    Attachments:
    You must be logged in to view attached files.
    #10585
    Gavalakis
    Keymaster

    Hello,

    Indeed. There is a small bug in code.
    To fix this, please open up AnyState.cs and change line #37, from “return” to “continue” 🙂

    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

    #10589
    voiceafx
    Participant

    Cool, that fixed it! Thanks for your quick support.

    I’m using both NodeCanvas and PolyNAV, by the way, and I’m quite pleased with both of them (I’m the guy who suggested the addition of path cost polygons to polynav). I’m planning to use NodeCanvas’ FSM capabilities to define and control the workflow for a complicated UI system. It’s really great, because I’ve been spending a looong time trying to figure out a good way to architecture my GUIs and the rest of my game with a gang-of-four style architecture, within the context of Unity. NodeCanvas puts all the pieces in place to make that happen seamlessly and effortlessly.

    So thanks! This rocks.

    #10590
    Gavalakis
    Keymaster

    Thanks a lot for your nice words! 🙂
    I am very glad you like the tools.

    Regarding the PolyNav suggestion, I will indeed take a look at it when possible.

    Thanks again and cheers!

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.