Version: 5.4
물리 레이캐스터
터치 입력 모듈(Touch Input Module)

스탠드얼론 입력 모듈

이 모듈은 컨트롤러나 마우스 입력이 작동하는 방식과 비슷하게 설계되었습니다. 입력에 대한 응답으로 버튼 누름, 드래그 등의 이벤트가 보내집니다.

The module sends pointer events to components as a mouse / input device is moved around, and uses the configured in the scene Raycasters to calculate what element is currently pointed at by a given pointer device.

The module sends move events and submit / cancel events in response to Input tracked via the Input manager, this works for both keyboard and controller input. The tracked axis and keys can be configured in the module’s inspector.

프로퍼티

프로퍼티: 기능:
Cancel Button Input manager name for the ‘cancel’ button.
Force Module Active Force this module to be active.
Horizontal Axis Input manager name for the horizontal axis button.
Input Actions Per Second Number of keyboard / controller inputs allowed per second.
Repeat Delay 초당 입력 행동 반복률이 유효하기 이전 지연 시간을 초로 나타낸 값입니다.
Submit Button Maximum number of input events handled per second.
Vertical Axis Input manager name for the vertical axis.

세부 정보

모듈은 아래 요소를 사용합니다.

  • 키보드와 컨트롤러 내비게이션을 위한 수직 및 수평축
  • 이벤트 제출 및 취소를 위한 제출 및 취소 버튼
  • 이벤트 간 타임아웃이 있어 초당 최대 이벤트 수만을 허용합니다.

모듈의 흐름은 다음과 같습니다.

  • 입력 관리자로부터 유효한 축이 입력된 경우, 선택된 오브젝트에 이동 이벤트를 보냅니다.
  • 제출이나 취소 버튼을 누르면 선택된 오브젝트에 제출 또는 취소 이벤트를 보냅니다.
  • 마우스의 입력을 처리합니다.
    • 새로 누르는 경우
      • PointerEnter 이벤트를 계층 구조 상에 있는 오브젝트 중 이 이벤트를 처리할 수 있는 모든 오브젝트에 보냅니다.
      • PointerPress 이벤트를 보냅니다.
      • 드래그 핸들러(계층 구조 상에 있는 요소 중 이 이벤트를 처리할 수 있는 첫 번째 요소)를 캐시합니다.
      • BeginDrag 이벤트를 드래그 핸들러에 전송합니다.
      • 이벤트 시스템에서 ‘Pressed’ 오브젝트를 선택됨으로 설정합니다.
    • 지속적으로 누르는 경우
      • 이동을 처리합니다.
      • 캐시된 드래그 핸들러에 DragEvent를 전송합니다.
      • 터치가 오브젝트 사이를 이동하는 경우 PointerEnter와 PointerExit 이벤트를 처리합니다.
    • 떼는 경우
      • PointerPress를 수신한 오브젝트에 PointerUp 이벤트를 전송합니다.
      • 현재 호버된 오브젝트가 PointerPress 오브젝트와 같은 경우 PointerClick 이벤트를 보냅니다.
      • 캐시된 드래그 핸들러가 있으면 Drop 이벤트를 전송합니다.
      • 캐시된 드래그 핸들러에 EndDrag 이벤트를 전송합니다.
    • 스크롤휠 이벤트를 처리합니다.
물리 레이캐스터
터치 입력 모듈(Touch Input Module)