Basic gamepad support for VAM. Posted here in case someone is interested.
Background
I have been studying unity for the last week. No prior knowledge but I can program in C++. Two plugins gave me the basics: Keyboard Shortcuts by lfe and MacGruber's Essentials. I got the rest from google. This is the first time I make a plugin, so please this is an early beta.
Coordinates
Local coordinates, even global coordinates becomes a mess with any gamepad configuration I tried after a few moves / rotations, so I had to take another approach. This is what I could come up with: all movements and all rotations are RELATIVE TO THE CAMERA.
For example, if you move an object UP with the left stick, the object will go up on the screen. If you rotate the camera 180 degrees and press UP again, the object will still go up relative to the screen. The main idea is to forget about axes and move stuff with an intuitive approach. This may work, or it may not. I haven't fully tested yet.
Controls
Below's a few hints to get a better idea about each mode:
1. Position mode (press and release RB)
- Camera mode (CAM) is ON by default
- If you get any stick inverted, try running VAM through Steam and configure your controller in there. Otherwise you can edit the source code, adding a minus (-) sign where appropiate.
Have fun!
Background
I have been studying unity for the last week. No prior knowledge but I can program in C++. Two plugins gave me the basics: Keyboard Shortcuts by lfe and MacGruber's Essentials. I got the rest from google. This is the first time I make a plugin, so please this is an early beta.
Coordinates
Local coordinates, even global coordinates becomes a mess with any gamepad configuration I tried after a few moves / rotations, so I had to take another approach. This is what I could come up with: all movements and all rotations are RELATIVE TO THE CAMERA.
For example, if you move an object UP with the left stick, the object will go up on the screen. If you rotate the camera 180 degrees and press UP again, the object will still go up relative to the screen. The main idea is to forget about axes and move stuff with an intuitive approach. This may work, or it may not. I haven't fully tested yet.
Controls
Below's a few hints to get a better idea about each mode:
1. Position mode (press and release RB)
- With the left stick you move the selected object around the screen relative to the camera.
- With the right stick (UP and DOWN) you move the selected object closer and away from the camera.
- With the left stick (UP and DOWN) you make the selected object rotate like saying YES pointing to the camera.
- With the left stick (LEFT and RIGHT) you make the selected object rotate like saying NO pointing to the camera.
- With the right stick (LEFT and RIGHT) you make the selected object "roll" (like an airplane rolling its wings) relative to the camera.
- With the left stick you move like any average FPS game. You move the camera forward, backward, left, and right.
- With the right stick you can freely look around like any FPS game. Up, down, left, and right.
- With the D-PAD you move the camera up & down and roll the camera to the sides.
- Add as session plugin.
- Open a scene, press SELECT first (to switch to edit mode), press Y (to select a person), press X or A (to select a body part). Switch between RB and RT (move, rotate) and play with the sticks. At any moment switch to LB to adjust the camera.
- Camera mode (CAM) is ON by default
- If you get any stick inverted, try running VAM through Steam and configure your controller in there. Otherwise you can edit the source code, adding a minus (-) sign where appropiate.
Have fun!