Tiny Town

Player pawn controls

The included player pawn class included in the City Builder template contains all the logic for movements and interaction with the grid. Although most of the logic is hidden from blueprints, there are several modifiers available.

Input settings

These are modifiers that affect the camera's movements and rotation for both keyboard and mouse input. The settings shown on the right are the default ones, but they are available to edit in the blueprint class defaults.

 

NOTE: In the current setup, these cannot be changed via blueprints. 

Camera settings

These variables are all related to the zoom mechanic. The camera uses a spring arm on which we apply a specific length. You can set a maximum, and minimum length, how many "steps" (how accurate) and the zooming speed.

NOTE: In the current setup, you can only change the spring arm's target length via blueprints. 

Block spawning

These two modifier change the way a block moves when it is being placed down on the grid. Its movement speed across the grid as well as its rotation speed on itself can be modified. The mouse threshold determines the distance the mouse has to travel to trigger a block rotation.

NOTE: In the current setup, these cannot be changed via blueprints. 

Change key bindings

When it comes to the controls themselves, all the key bindings were made inside the pawn using Unreal Engine's action and axis binding (ProjectSettings/Input). 

They are directly linked to C++ functions, but they can easily be overridden and/or replaced by your own movement system.

Last updated: August 2019
  • GitHub
  • Sketchfab
  • LinkedIn
  • Twitter