Hi,
Here we go, attached a unitypackage with a packman you can control with the arrow keys.
The next step would be to define how you intend to work out the pacman behavior as it hit walls, and for this several solution are possible, either you switch to full physics and instead of translating, you apply force to it, which would solve the wall collision all together, or you apply some math and checks to know what input is not allowed and when to stop. nothing really dramatic, just need some brainstorming.
the trick on this package is the use of "set event target" action in the "watch input" state of the Input controller fsm. Basically, It directly broadcast the events then. Without "set event target", you would need to create transition events, and then use "send event" action, which creates more states, more work ( and we don't like that...)
Then the rest is very simple, I added a speed factor on the "movement controller" so that you can control speed live ( pac man would be able accelerate as the level gets more complicated for example).
If you have any question, let me know!
Bye,
Jean