R34 Airship Project - Week 5 - Attatching Objects to hands and adding gesture control
This week I worked on having things react to your hands in VR in other ways than just moving them when you touch them. I also looked into gesture control with leapmotion so that you can extend specific fingers to trigger actions.
I started by finding out how to attach objects to the in game hand models. this would allow me to use reference points on the hand or have objects follow the hands. Much like the hand tracking, the setup for this is very simple, you drag the "attachment hands" prefab from the asset pack into the hiararchy, next to the other hands in the game, what this allows you to do is select which parts of the hand you would like to attach things to.
You can then set the position and rotation of the child object relative to the hands that are in the scene so that you know exactly how the attached object will look in the game. While just having an object attached to your hand isnt that exciting, the posibilitys are quite cool, you could have partical effects attached to these points so you could make it look like the tips of the fingers are on fire, or get the transform of the child object that you can use in other scripts for other things a good example of this would be moving an object towards the transform, like a force pull from starwars.
This week, much like last week didnt have much in terms of progress towards the final program of this project however my understanding of this software has improved alot so that when I get to creating the final game I can do everything quickly, and the right way so I dont have to fix things later.
Attatching Objects
You can then set the position and rotation of the child object relative to the hands that are in the scene so that you know exactly how the attached object will look in the game. While just having an object attached to your hand isnt that exciting, the posibilitys are quite cool, you could have partical effects attached to these points so you could make it look like the tips of the fingers are on fire, or get the transform of the child object that you can use in other scripts for other things a good example of this would be moving an object towards the transform, like a force pull from starwars.
Gestures
Once I understood how to attach objects to hands, I moved onto gestures, the leap motion asset pack includes a script that can detect when fingers are extended, it has some options such as the amount of fingers to check for extention aswell as which specific fingers to check. This means that you can trigger actions for lots of different situaltions such as a thumbs up, or a point, you could also set it so that all of your fingers have to be extended. the action that can be triggered is any public function in any script giving you alot of options and flexibility for what you can do. In my example here I made it so that a ball apears when you open your hand and dissapears when you close it.This week, much like last week didnt have much in terms of progress towards the final program of this project however my understanding of this software has improved alot so that when I get to creating the final game I can do everything quickly, and the right way so I dont have to fix things later.
Comments
Post a Comment