Dual-Target Focus Camera System

Wiskered

(0)
$12 $13
ENDS SOON ! -10%
Publisher Wiskered
File size 90.17kB
Number of files 11
Latest version 1.0.0
Latest release date 2025-02-10 10:51:13
First release date 2025-02-10 10:51:13
Supported Unity versions 2018.4.2 or higher

▪―――――――――― CONNECT WITH US ――――――――――▪


wiskered.com | Twitter | Discord | YouTube | Instagram | Itch.io



▪―――――――――――― OVERVIEW ――――――――――――▪


The Dual-Target Focus Camera System is a specialized tool designed for games with physics-heavy characters and environments. It solves common camera issues like jittery tracking, obstacle clipping, and unnatural movements through a unique dual-target architecture. Originally developed for FUNBRUN (in active development), it prioritizes adaptability, precision, and smoothness in chaotic scenes.



▪――――――――――― KEY FEATURES ―――――――――――▪


PlayerCameraController

  • Rotation: Horizontal and vertical rotation with adjustable speed (rotationSpeed) and angle clamping (minYRotationAngle, maxYRotationAngle).
  • Zoom: Manual control (zoomSpeed, zoomSmoothSpeed) and auto-zoom for obstacle avoidance.
  • FOV Adjustment: Dynamic FOV changes (e.g., squinting) with smooth transitions (squintPercentage, fovSmoothSpeed).
  • Horizontal Obstacle Avoidance: Detects walls and objects via range-based raycasting. Adjustable collision radius (collisionRadius) and pre-collision buffer (preCollisionPlusDistance).
  • Smoothing: Smooth recovery after collisions and movements.

CameraFocusTarget

  • Vertical Tracking: Maintains vertical offset (axisDeviationY) to avoid clipping into floors or ceilings.
  • Noise Filtering: Uses a custom speed-based curve (smoothTimeCurve) to dampen physics jitter.
  • Vertical Obstacle Avoidance: Detects ceilings via upward raycasting and adjusts height dynamically.
  • Dynamic Offset: Shifts target position based on character tilt and zoom.


▪――――――――― TECHNICAL HIGHLIGHTS ―――――――――▪


  • Input System Integration: Supports mouse, gamepad, and keyboard.
  • Event-Driven Workflow: Use UnityEvents (onCollisionDetected, onSquinting) for custom logic.
  • Debugging Tools: Visualize rays, collision zones, and focus points with toggleable Gizmos.
  • Layer-Based Obstacle Detection: Define custom layers for collision detection (obstacleLayer).


▪―――――――――――― USE CASES ――――――――――――▪


  • Physics-Intensive Games: Ragdoll characters, destructible environments, procedural animation.
  • Exploration/Parkour: Maintain visibility in tight spaces or vertical levels.
  • Cinematic Projects: Achieve smooth camera movement without complex scripting.


▪――――――――――― SPECIFICATIONS ―――――――――――▪


Requirements: Unity 2020.3+, Input System Package.


Included Assets:

  • PlayerCameraController.cs
  • CameraFocusTarget.cs
  • README + In-Engine Comments
  • Demo scene.

Demo scene:

  • Test area with obstacle blocks.
  • Sphere simulating a character with physics (chaotic movement in the air).
  • Preconfigured scripts (PlayerCameraController, CameraFocusTarget, DemoPhysicsSphere).


▪―――――――――― LIMITATIONS ――――――――――▪


  1. Not Universal: Optimized for physics-driven characters. Avoid using for static cameras or 2D/orthographic projects.
  2. Demo Limitations: The included demo is minimal. The trailer showcases FUNBRUN footage, but game content is NOT included.


Top Publisher Assets