Player Controller for top-down games


Basic manual 

This system allows you to easily implement cool player controlling for top-down games (like Diablo):

  • Control player by mouse (or other input device)
  • Manage/direct and perform all interactions with game-objects (enemies, NPCs, pick-ups, locks etc) 
  • Link and manage animation related for those interactions
  • Support movement both on custom geometry/collider and Terrain objects

Moreover, it’s really easy to extend the system and implement any new actions you may need in game. 
This system works on all platforms supported by Unity3D. 


How to use

To use this system – you should: 

1st option (auto):

  1. Delete default MainCamera in scene

  2. Add(drag and drop) all prefabs from “_TopDown_PlayerController\Prefabs\” to Hierarchy window

  3. If needed – replace default player model (Lerpz) to another and update AnimatedObject property of

    “PlayerDirector” component (in _Player object) accordingly.

2nd option (manual):

  1. Create new object with Rigidbody and Collider (IsTrigger = true) attached, attach “GameCursor” component to it. It will be our cursor.

  2. Create new object (with Rigidbody and Collider if needed) and attach “InputManager”, “PlayerController” and “PlayerDirector” components to it. It will be our player.

  3. Attach “FollowingCamera” component to MainCamera and place camera and assign player object object to it target property. (Object should be visible in camera view, cuz camera always tries to keep initial offset against the player)

  4. Assign cursor object and “InputManager”, “PlayerDirector” components to related properties of “PlayerController” component (in _Player object).

  5. Add child object (with animation) to player object and assign it to AnimatedObject property of “PlayerDirector” component.

  6. Setup needed actions in Actions list of “PlayerController” component. 


Objects to interact - should have custom Tag, same as in “triggeredObjectTag” variable of related actions.

To create brand new action type – you should add it to ActionTypes list in “PlayerController” script and add related function with the same name in “PlayerDirector” script.