O'Reilly logo

CryENGINE 3 Cookbook by Dan Tracy, Sean Tracy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Changing the player camera through key input

In this recipe, we will look at a simple setup to allow the player to switch from the First Person view to the Third Person view.

Getting ready

Open My_Level.cry within the Sandbox

How to do it...

  1. Begin by placing an AreaTrigger entity onto the map to use as the container for the Flow Graph.
  2. In the RollupBar, click on the Entities button.
  3. Under the Triggers section, select the AreaTrigger.
  4. Right-click the newly placed AreaTrigger and create a new Flow Graph. Name the Flow Graph as PlayerViewToggle.
  5. With the Flow Graph open and the new AreaTrigger selected, add in the following nodes:
    • Game:LocalPlayer
    • Input:Key
    • Logic:Sequentializer
    • 3x System:ConsoleVariable
    • Misc:Start
  6. Set the input Key = g.
  7. Set all three System:ConsoleVariable ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required