Working with camera

Focusable Zones

It is possible to define special regions on the map that can make the camera zoom and center on themselves. We call them "Focusable Zones". When player gets inside, his camera view will be altered - focused, zoomed and locked on defined zone, like this:

Adding new Focusable Zone:

  1. Make sure you are editing an Object Layer

  2. Select Insert Rectangle tool

  3. Define new object wherever you want. For example, you can make your chilling room event cosier!

  4. Make sure your object is of type "zone"!

  5. Edit this new object and click on Add Property, like this:

  6. Add a bool property of name focusable:

  7. Make sure it's checked! :)

All should be set up now and your new Focusable Zone should be working fine!

Defining custom zoom margin:

If you want, you can add an additional property to control how much should the camera zoom onto focusable zone.

  1. Like before, click on Add Property

  2. Add a float property of name zoom_margin:

  3. Define how much (in percentage value) should the zoom be decreased:

    For example, if you define your zone as a 300x200 rectangle, setting this property to 0.5 (50%) means the camera will try to fit within the viewport the entire zone + margin of 50% of its dimensions, so 450x300.

    • No margin defined

    • Margin set to 0.35

Need some help?

WorkAdventure is a constantly evolving project and there is plenty of room for improvement regarding map editing.

If you are facing any troubles, do not hesitate to open an "issue" in the GitHub WorkAdventure account.

🔍 Found a typo? Want to propose improvements? Do not hesitate to directly propose changes.