Flight Stick and Throttle

Hi all

During Udon development I built a flyable space ship world. There were parts of this world I thought would be helpful to share. These graphs are pretty large and they don’t quite work the same.

The I made the throttle control first, so it’s output is a little rough. I read the rotation angle of the throttle itself and used it to apply force to my space ship. The throttle stays where you leave it when you let go so you don’t need to hold it indefinitely.

The flight stick graph is a bit more advanced. It has two public variables for the angle of the stick that you can use to apply force/torque to a vehicle or object, or run other logic. The flight stick will center itself if you let go.

I hope someone here might find these useful.


1 Like

These are great! Thanks for sharing :slight_smile:

I’ve attached them to an airplane model as controls and I’m now figuring out how to wire them up (new to Unity and game programming, old to programming non-game stuff). Do you have any recommendations on how to apply force to a vehicle for VRChat/Udon using these controls?

Can we make vehicles rigid body objects with physics?

1 Like

What I did for my world was to create a third graph that used GetVariable from the flight stick graph.

The vehicle was a rigibody with a station on it, and I added forces and torque to the rigid body based on the controls