Game logic - Custom Camera – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search


Custom camera allows to create custom views of the scene, cutscenes or character views.


  • Is audio listener - if checked, sounds in the scene will be heard from the position of the camera.
  • Are lights relative to the camera - if checked, maximum distance of visibility of light sources in the scene will be determined based on the position of the camera instead of the player.
  • Fading style - select a desired transition to be used when switching to this camera.
    • Fading time - length of the animation of the transition in real time seconds.

Camera types

  • 3rd person - allows to set view distance from player.
  • Custom - allows to customize camera on all parameters: position, offset, aim, player controls etc. More details below.
  • FPS - first person.
  • Side scroller - side camera. Limits the player movement to X/Y axis (horizontal movement and jumping/falling).
  • Static - camera fixed to a specific position.
  • Top down - the view from the top, set up any height and angle.

Camera type - Custom

Custom camera type allows a broader set of options. Some of the settings do not work in conjunction. As a starting point, you can switch to Custom type from one of the templates to copy its settings.

  • Force camera FOV - allows to set the field of view of the camera. The higher the value, the wider the angle of view.
  • Target - sets an object to be used as a baseline for Position and Aim settings.
  • Position
    • On spring from target - camera will follow the target on a smoothly animated "rope". It's length is defined by the Distance slider.
    • Same as target - camera will share position values with it's target. Offset in global space. Relative offset will change the local space to that of the target.
  • Aim - sets the direction of the view of the camera.
    • Aim as - camera will share the rotation of the selected object. Rotation offset in Euler angles.
    • Aim as target - camera will share the rotation of the target.
    • Look at - camera will face the selected object. Offset in global space. Relative offset will change the local space to that of the target.
  • Player controls - these settings modify how the player controls behave while the camera is active.
    • Absolute (reference axis) - player will only move on the Reference axis.
      • Plane and angle - use either XZ plane or XY plane for player movement. Offset rotation of the plane using Angle slider.
      • Reference object - use a local plane of the selected object for player movement.
    • Camera relative - move on the local plane of the Custom camera.
    • Player relative - move on the local plane of the player character.
    • Allow heading flip with pitch - changes direction of the character in side-scroller type camera if the pitch of the character reaches a threshold.
    • Vertical - select a way of aiming on the vertical axis.
    • Horizontal - select a way of aiming on the horizontal axis.
    • 4 directional movement - limits the movement of the player character to up, back, left and right only.

At any point, it is possible to preview the camera settings with the button on the bottom of the properties window.


For in-game examples of the custom camera use, check the templates in Editor - Create new - Templates.