Well, i'm an old virtools hand, so I can come up with visual decision trees in my sleep, especially when working with vectors and such. Now I realise the core logic of virtools was based on a loop and not state machines , but I still try..
I find I create a lot of simple movement systems based on a simple velocity vector, some friction and forces. So for instance the camera has a velocity, a friction and gets a force added to the velocity based on distance vector to a targetPos. The reason I create this little "simple physics"systems is basically control, and very precise control at that. Plus Its simple and easy to manage.
So an example.. my camera system. simplified a bit
state 1
actions that get, transform and calculate a force based on the mouse or touch delta
state 2
A check if the camera is getting out of bounds (its limited to a range from the active creature), simple distance check (either go directly to state 3 or state 4)
state 3 if the distance is beyond the range, I transform the touch force along the radius of the range circle of the object (forcing the camera to stay within range, while still providing movement ontouch or onmousedrag) , there will be a few other states that show a boundary UI indicator and lerp the color etc etc.
state 4 actions to determine if the player is pushing the camera or if its un-used(idle) go to next state if its idle or to state 6 if the camera is moved
state 5 if the user input is idle, the camera is following the creature. So I do a check if the creature is moving, and another state to calculate the target force for the camera to move towards the active creature
state 6 the camera is already moving through touch or mouse interaction, so it basically continues to state 7 (I add a few GUI indications during this state as well)
state 7. combine all the forces with the friction and transforms the camera.
ends with next frame event back to state 1
It sounds over-engineered, but provides a really nice interactive camera that can do a lot of things.. there's a whole bunch of other states in there, for checking if the another manager is over-riding the camera for dialogue (camera is targeted to the NPC, just switches the forces over from following a creature to a npc)
Here's a screengrab, Now I haven't cleaned up, so its a prototype, I guess I can combine a lotta states, but not all.
Here's a video of what of the end result
So It's all a big decision tree, run in one frame. So I'm contemplating writing some C# code to manage this, but honestly that's a pain for me. Especially if this FSM already does exactly what it needs to do, but its a bit of a performance hog.
So in this case the majority of the transforms, (the camera, the camera main target, etc) are static, and only an updated position is required. So if those could be cached at an onStart that would save at least some overhead.
Sorry if some of my lingo is off regarding transforms and such, I really try to stay within visual scripting, as typing and doing syntax bums me out.