11th of December Update
So I think it's probably easiest to start with the screencast of what I've done over the past few days:
So I currently have the very very basics of the core functionality working as you can hopefully see. We can toggle 4 hands on and off using the buttons and we can mirror the left hand over to the right and have two hands using just one and vice versa for the right hand mirroring.
At the current time the functionalities that I have present are:
1. Reset to normal which just has your two hands represented
2. Mirror your left hand which removes your right hand from the scene
3. Mirror your right hand which does the opposite
4. Four hands which renders the four hands
Implementing this functionality ended up being a little bit more difficult than originally thought. My first plan was to simply change the hand models active state on a button press but they have a script attached which overrides my code for rendering the models when a hand is active. I didn't want to meddle with that too much because it would probably break a whole host of new things so instead I used the HandPool script associated with the actual controller.
The HandPool represents a list of "models". Each model has a name, a left model, right model and a couple of other variables associated with it. I think the main intention behind having this is so that you can have multiple models associated with a single hand, i.e a physics hand and a graphics hand. The way I took advantage of this was I created three models per controller (the normal controller and the mirrored controller) which represented either two hands, one left hand and a debug hand or one right hand and a debug hand. What this then allowed me to do was from a script enable and disable different models on each controller to create the functionality that I wanted. This may cause problems further down the road if we want to be able to switch between hand mesh's like in Sam's demo but we will cross that bridge when we get to it.
Issues:
1. The first issue which I think is small however I haven't actually looked into it too much yet (so will probably end up being stupidly complicated) is to fix the warping issue I mentioned in the last blog post. I tried to show it briefly at the end of the screencast above where when i move my head around the mirrored hands move with me rather than staying in the same place like the normal hands. I think this would just be an issue of negating where the warping occurs but not TOO sure yet.
2. The bigger issue (I think I again haven't tried to fix yet) is with the Interaction Engine. The way that it's suppose to work I think is that it has two components:
- An Interaction Manager that you add to your controller which is a prefab that uses something called Interaction Hands
- Interaction Behavior which is a script you attach to objects you want to be able to interact with. This script needs to have a reference to a singular Interaction manager.
So the problem with this is if you haven't guessed already is that this has been designed with the idea in mind that you will just have one controller interacting with the world space, this means the interaction manager has been designed to only handle one controller and an interaction behavior is only designed to have one manager. This means that currently my mirrored hands are just for show. They can't actually interact with anything yet which in the case of the UI is actually useful because the mirrored hand tends to push other buttons accidentally (should probably change the lay out to vertical) however will need to be fixed if we want to be able to stack boxes like we are suppose to.
I think in general the fix to this will be hidden someone in the pages of code or maybe (not likely) in the documentation online. It will just take some time to understand what exactly these components are doing by reading through the code and hopefully I'll be able to find a way to incorporate Leap's nice object interaction handling into this project.
Comments
Post a Comment