평점 만점의 리뷰가 11,000개 이상

8만 5천명 이상의 리뷰

10만명 이상의 포럼 멤버가 선호하는 에셋

유니티에서 모더레이팅하는 모든 에셋

도구
카메라
This content is hosted by a third party provider that does not allow video views without acceptance of Targeting Cookies. Please set your cookie preferences for Targeting Cookies to yes if you wish to view videos from these providers.
1/2
The CameraController script provides comprehensive camera movement, rotation, and zoom functionality for a Unity project in both 2D and 3D environments.
Render pipeline compatibility
The Built-in Render Pipeline is Unity’s default render pipeline. It is a general-purpose render pipeline that has limited options for customization. The Universal Render Pipeline (URP) is a Scriptable Render Pipeline that is quick and easy to customize, and lets you create optimized graphics across a wide range of platforms. The High Definition Render Pipeline (HDRP) is a Scriptable Render Pipeline that lets you create cutting-edge, high-fidelity graphics on high-end platforms.
Unity VersionBuilt-inURPHDRP
6000.0.29f1
Compatible
Compatible
Compatible
설명

This script controls the camera in a Unity scene, enabling users to move, rotate, and zoom using customizable key bindings. It offers the flexibility to:

  • Pan the camera using keyboard inputs or screen edge panning with mouse control.
  • Rotate the camera around a defined pivot point or around its own position.
  • Zoom in and out with assigned key controls.
  • Limit camera movement within a defined boundary range for each axis (X, Y, Z).
  • Provides an optional pivot for rotating around specific points in 3D space.
Technical details
  • Movement Modes: Supports movement via keyboard keys (W, A, S, D) and mouse edge panning (customizable border thickness).
  • Rotation: Handles free or pivot-based rotation, customizable via key inputs (Q, E, R, F for different axes).
  • Zooming: Zooms in and out based on key inputs (Z, X) and limits zoom range by Y-position.
  • Speed Controls: Includes configurable movement speed, rotation speed, and zoom speed.
  • Boundary Clamping: Ensures the camera stays within set movement boundaries defined by minX, maxX, minY, and maxY.
  • Pivot Point: Optionally supports rotation around a specified pivotPoint transform, otherwise rotates around its own position.
  • Key Bindings: Each action (movement, rotation, zoom) can be independently enabled or disabled and configured with specific keys, including custom controls for vertical movement in 2D games.
  • Collision-Free Movement: The script does not handle collisions but can be adapted to prevent the camera from passing through objects by adding collision detection code.

Key Fields:

  • canKeyPan, canMousePan, canRotate, canZoom: Toggles for enabling/disabling movement, rotation, and zoom functionalities.
  • moveForward, moveBackward, etc.: Key bindings for camera movement and actions.
  • panSpeed, rotationSpeed: Control the speed of the camera's movement and rotation.
  • minX, maxX, minY, maxY, minZ, maxZ: Boundaries to constrain the camera's position.
  • pivotPoint: Optional point around which the camera can rotate.

This script provides versatile camera control mechanics that are essential for many Unity-based projects, offering both flexibility and ease of integration into various game types.

Universal Camera Controller (2D and 3D)

(평가가 충분하지 않습니다)
2 users have favourite this asset
(2)
$15
Seat
1
Updated price and taxes/VAT calculated at checkout
Refund policy
This asset is covered by the Unity Asset Store Refund Policy. Please see section 2.9.3 of the EULA for details.
Secure checkout:
Supported payment methods: Visa, Mastercard, Maestro, Paypal, Amex
라이선스
파일 크기
180.3 KB
최신 버전
1.0
최신 릴리스 날짜
2025년 3월 4일
원본 Unity 버전
6000.0.29
Quality assets
Over 11,000 five-star assets
Trusted
Rated by 85,000+ customers
Community support
Supported by 100,000+ forum members
Unity logo
언어
어필리에이트 프로그램
멤버십링크 생성기어필리에이트 ID
Feedback
파트너 프로그램
협력사
USD
EUR
Copyright © 2025 Unity Technologies
모든 가격은 부가가치세를 제외한 금액입니다.
USD
EUR
$15