# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/talisman-environment-template-in-unreal-editor-for-fortnite
# Local doc: epic-docs/documentation/en-us/fortnite/talisman-environment-template-in-unreal-editor-for-fortnite.md
# Section: Using the Orbit Camera Device
# This file handles swapping between different cameras when an input is pressed.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Fortnite.com/Characters }
using { /UnrealEngine.com/Temporary/Diagnostics }
# See https://dev.epicgames.com/documentation/en-us/uefn/create-your-own-device-in-verse for how to create a verse device.
# Registers the channel for debug logs.
camera_switch_mode_log := class(log_channel){}
# Container class for a gameplay camera and whether it should
# hide the player character when the camera is added to a player.
gameplay_camera := class<concrete>():
# The camera device associated with this class.
@editable
Camera:gameplay_camera_orbit_device = gameplay_camera_orbit_device{}
# Whether this camera should hide the player character.
@editable
ShouldHideCharacter:logic = false
# Swaps between different cameras when an input trigger is activated.
camera_switch_mode_device := class(creative_device):
# A device for printing debug log information.
Logger:log = log{Channel := camera_switch_mode_log}
# How long to wait before hiding the player character model
# when a camera is added to a player.
@editable
HideDelay:float = 0.20
# How long to wait before showing the player character model
# when a camera is removed from a player.
Verse Library
verse
02 Using The Orbit Camera Device
Swaps between camera modes on trigger and controls character visibility during switches.
extracted-snippets/documentation/en-us/fortnite/talisman-environment-template-in-unreal-editor-for-fortnite/02-using-the-orbit-camera-device.verse
Sign in free to read the full source 🌴
This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.