Now that you've completed the Getting Started Kit and have a basic understanding of programming with Phidgets, you can easily integrate sensors into your Unity projects.
This project assumes you have an understanding of Unity and have completed the Getting Started Kit.
For more information, check out the Student Page.
You will need:
- A Getting Started Kit
Connect your Getting Started Kit to your computer.
You've now successfully added the libraries to your project. The next step is creating your environment.
Note: if you are using an older version of Unity, check here for information on how to add the libraries.
The first step is to open your BallScript file and add a reference to Phidget22.
Next, create a DigitalInput object for your button, as well as a Rigidbody component for your sphere.
Add a StateChange event for your button like you've done in previous projects. Also add a boolean called buttonState to track whether the button has been pressed or not.
Try running your program. You should see your sphere jump when the button is pushed.