Skip to content

Player Input

Setting up player input for a secondary world loaded through Viewport World is slightly different than how you would do it for normal world.

flowchart TB
  subgraph row1[" "]
    direction LR
    Input["Enhanced Input"] --> Choice{"Where is input setup?"}
  end
  subgraph row2[" "]
    direction LR
    VPC["ViewportWorldCharacter"] --- VPP["ViewportWorldPawn"] --- VPPC["ViewportWorldPlayerController"]
  end
  subgraph row3[" "]
    direction LR
    World["Secondary world pawn"]
  end
  Choice -->|Character| VPC
  Choice -->|Pawn| VPP
  Choice -->|Controller| VPPC
  VPC --> World
  VPP --> World
  VPPC --> World

To make it easier for developers, we have provided three classes in Viewport World plugin in which at least one of them should be used (you don’t have to use all 3).

  • Viewport World Character is a custom character class that should be inherited from if you setup inputs in character class. For example, a third person or first person character.

  • Viewport World Pawn is a custom pawn class that should be inherited from if you setup inputs in pawn class. For example, top down player pawn.

  • Viewport World Player Controller is a custom player controller class that should be inherited from if you setup inputs in player controller class.