Code Monkey home page Code Monkey logo

Comments (3)

Muzz avatar Muzz commented on June 24, 2024

Ok, so we're heavily blocked with improving our character controller until we do this, we have so many states that need to have their transitions modified by code ect that the current setup isn't viable, also the lack of transparency of what's happening under the hood of the transition system in dev makes the systems very difficult to debug.

I'm looking into how to do it, but it seems to be very clunky with how things are setup.

The approaches I'm looking to try is using a similar approach to the virtual one shot animation function, and create a virtual transition and discard it once it's fired. But that has complications as i would need to have a way of specifying what node is the state machine, then building the transition and firing it.

I'm happy to spend a few days implementing this, but i'll need guidance on the best way to do it, as i don't fully understand what's going on under the hood, and there isn't many examples of doing something like this in the code base to work from.

We can't afford to wait on this feature though, hence why i need to work on it.

from flaxengine.

mafiesto4 avatar mafiesto4 commented on June 24, 2024

Have you tried using a structure passed to the graph with all transitions - I'm aware there might be a lot states required to handle but with Any state you can create only a single transition to each state. https://docs.flaxengine.com/manual/animation/anim-graph/state-machine.html#any-state

public struct MyTransitions
{
    public bool Idle;
    public bool Run;
    public bool Walk;
}

We could implement a similar API to enforce the state via API call (via AnimatedModel that owns AnimGraphInstanceData and can write custom data there for this feature) but it breaks the (simplicity of) design of Anim Graph.

from flaxengine.

Muzz avatar Muzz commented on June 24, 2024

Thanks for replying!

Setting the parameters to switch states isn't the issue, we just use an int to do that which is very easy, just one param.

The any state node will help things a lot once it's fixed, but that doesn't get around the issue of programmatically setting the transition settings, we can't pass these in as params. And if we can get a way to programmatically change the properties of the transition, we're not using the utility of having a transition graph.

There are many times where we want to transition into a state faster given a set of circumstances, and it would be much better to have this be dynamic.

Being able to just call change state in code with the settings we want, would greatly simplify our system and prevent us needing to replicate our characters state transitions within the anim graph.

from flaxengine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.