Hot answers tagged

1

It seems like the BEHAVIOR should control the MOVEMENT state, belonging to a different component.


1

Here's a theory on what's happening, all in a single frame: The player presses "E" - Input.GetKeyDown(KeyCode.E) will return true for this frame. Your state machine update runs, and calls Player_Interaction_Carry_State.OnUpdate() The carry state checks to see if E was pressed this frame. It was, so it drops the item and triggers the change to the idle state....


Only top voted, non community-wiki answers of a minimum length are eligible