GregTalotta / 241_chair_spin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Moving a Physical Chair Corresponding to an Object in Unity

The problem I am trying to solve is how to communicate to a simulator chair from a Unity game. The problem has two main aspects. The first being how to communicate to an Arduino from Unity, and the second being the design of the simulator chair. I decided to focus on the communication from Unity to Arduino. If it is made well it can be scaled and changed to work with different Arduino uses.

My approach to this was to first make the simplest/cheapest chair prototype I could. I made it from a cake stick, a straw, a servo, twine, and some foam board. I would have liked to use something better then twine to connect the drive shaft and the chair, but I couldn’t find anything that fit. Twine, or other string, can be tied to whatever tautness I desire. I then decided to code a pure C# application to control it. I then changed the C# application to a single file that can be added to a Unity project. It has a function that takes the angle the chair should spin to, assuming a neutral point of 0 (for angle passed to it). I passed the y translation angle of the ATV object.

About

License:MIT License


Languages

Language:C# 63.9%Language:C++ 36.1%