NWH Vehicle Physics 2
Search Results for

    Show / Hide Table of Contents

    Mobile Scene Input Provider

    Scene input provider for mobile platforms using on-screen UI buttons.

    Setup

    1. Add MobileSceneInputProvider component to a GameObject in the scene
    2. Create UI buttons in the scene using MobileInputButton components (extends Unity UI Button)
    3. Assign the buttons to the provider:
      • changeCameraButton - Button to cycle through cameras
      • changeVehicleButton - Button to switch between vehicles

    MobileInputButton

    MobileInputButton is an extended Unity UI Button with state tracking:

    • hasBeenClicked - True for one frame after clicked, then resets automatically
    • isPressed - True while button is held down

    The MobileSceneInputProvider polls these flags to detect button presses.

    Limitations

    This provider only handles camera/vehicle switching. Vehicle controls (throttle, steering, brake) require a separate MobileVehicleInputProvider.

    Camera rotation, panning, zoom, character movement, and GUI toggle are not supported and return zero/false.

    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics