Publisher | Davie Ramble |
---|---|
File size | 85.25MB |
Number of files | 28 |
Latest version | 1.0.0 |
Latest release date | 2024-03-18 07:19:11 |
First release date | 2024-03-18 07:19:11 |
Supported Unity versions | 2018.4.2 or higher |
Overview
The Vintage Ammeter Set comprises three ammeter models, each featuring a functional ampere indicator with a range spanning from 0 to 12 amperes.
Features
Functional ampere indicator: Set the target ampere value using the targetAmps variable, a public float property ranging from 0 to 12.
Pointer speed: Adjust the speed of the pointer as it moves towards the target ampere value with the pointerSpeed variable. This public float property has a customizable range between 0.05 and 2, where smaller values correspond to higher pointer speeds and vice versa.
Usage
Using Prefab:
- Drag and drop the provided prefab into your scene.
- Adjust the targetAmps and pointerSpeed variables in the Inspector as per your requirements.
Manual Setup:
- Attach the VintageAmmeterPointerValue script to the GameObject representing the vintage ammeter.
- Ensure a child GameObject named "Vintage Ammeter Pointer" is under the main GameObject, representing the rotating pointer. The local position of the pointer is set to Vector3(0, 0.0435f, -0.03343f) by default.
- Adjust the targetAmps and pointerSpeed variables in the Inspector as per your requirements.
Run the scene, and the script will smoothly rotate the pointer towards the specified target ampere value.
Scripting
For dynamic control, externally edit the targetAmp and pointerSpeed variables through your scripts, seamlessly integrating with other game logic. Check the provided sample script in DemoScene.cs, attached to the Plane object in the demo scene, for reference.