Star Wars Lightsaber with Unity and Leap Motion
This week, I want to share with you, my Star Wars Lightsaber project.
Star Wars Lightsaber 3d Model
Unity Core Assets
It provides a utility hand model with quick access to the several parts of the hand (more…).
I’ve used it to add an empty gameObject to the Right Hand Palm. It works as the parent object for the lightsaber when the player is holding it. IMAGE1
In this Module, there are Detectors and Detector Logic Gates (more…). A Detector helps identify several hand and finger positions. A Detector Logic Gate combines individual detectors and returns the global result.
Detector Logic Gates
- Used to grab the lightsaber;
- Combines the Palm Forward with the Extended Fingers;
- Used to switch on/off the lightsaber;
- Uses the Not Extended Fingers Detector (I don’t remember why I used a logic gate while a single detector was enough);
- Used to release the lightsaber;
- Combines the Palm Down with the Extended Fingers;
I’ve only used the Rigged Hands prefab (more…).
- Implements the Grab, Enable and Release actions;
- Controls the lightsaber light animation (particle system and scale);
- Controls the lightsaber sounds.
Happy Coding 🙂