c# - Implementing State Machine for Unity3D NPC characters -
i can't seem wrap head around topic , need bit of push forward, maybe example.
i'm developing project including simulating large number of automated characters trying fulfill "needs". characters have need levels stored in scripts simple floating point <0,1> value , check every frame if exceeds given value , try move defined point , satisfy need.
the problem 1 character can have many needs , leads situation when character moves satisfy 1 need , drops below threshold moves satisfy next need. assuming later needs "rise" on time big problem.
i think should implement state machine transition idle -> move satisfy -> wait satisfy -> idle said cant quite understand whole state machine thing. closest understanding me this: https://github.com/nblumhardt/stateless still cant wrap mind around it.
would grateful help, tutorials, examples, anything.
Comments
Post a Comment