This is mainly the default player brain created by Project Spark. But some update have been done, for example to manage overweighted.


For now, the movement rules have two states : overwheighted / not overweighted

The first thing is to check if the player is overweighted. To achieve that we need to check if the number inventory space occupied by items exceed the player max capacity. A move speed variable is used to track and set the player move speed.

Compute move speed

Now, if the player is overweighted, we disable the jump and dodge action. Here the example for the dodge action (allowed only if "moveSpeedFactor" >= 1):


Open inventoryEdit

The player control logic host also the command to open the inventory using "DPad-up".

As we want that the player not more move or act when the inventory is opened, we push a new brain logic in the channel used for the input control. So the "Player Control" logic is temporarly masked by the new "InventoryManagement" logic.


When the player will close the inventory, this new brain will be simply pushed from the channel, and then the previous "Player Control" logic will be automatically re-activated. This behavior is part of the "InventoryManagement" logic.