NetPad
  • General
    • Introduction
    • Technical Overview
  • Manual
    • Terminology
      • Server (Game), Client (Controller)
      • Controller - Input, Proxy
      • Constants
      • Webserver
    • Components
      • NetPadServer
      • NetPadClient
      • NetPadBehaviour
      • Input
        • NetPadJoystick
        • NetPadGyroscope
        • NetPadDPad
          • DPadButton
        • NetPadAccelerometer
        • NetPadTouch
        • NetPadCamera
        • NetPadButton
      • LayoutListener
      • NetPadDiscoveryServer
      • NetPadDiscoveryClient
    • Other
      • Attributes
      • Build Pipeline
      • NetPad Settings
      • NetPad Constants
    • Tutorials
      • Getting Started
        • Project Setup
        • Game Setup
          • Preperation
          • Ball
          • Ball Spawner
          • Scene Setup
        • Controller Setup
          • Background - Player Properties
          • Scene Setup
        • Build
Powered by GitBook
On this page
  1. Manual
  2. Components
  3. Input

NetPadAccelerometer

The NetPadAccelerometer class is a networked controller component that captures and synchronizes accelerometer data between a client device and a server. It inherits from NetPadClientController and uses AccelerometerMessage for data transfer.

  • Identifier: A unique string to identify and separate different instances.

  • Threshold: Minimum change for accelerometer data to be considered updated.

  • IsSupported(): Checks if the device supports accelerometer functionality.

  • UpdateData(AccelerometerMessage message): Updates the AccelerometerMessage with the latest accelerometer data.

  • HasChanged(): Determines if accelerometer data has changed beyond the specified threshold.

NetPadAccelerometer ensures efficient use of network resources and accurate synchronization of device accelerometer information in networked games or applications.

PreviousDPadButtonNextNetPadTouch

Last updated 2 years ago