A comprehensive Unity package for hand simulation with joint management, materials, and demo scenes.
- Hand Management: Complete hand simulation with configurable joints
- Joint Types: Support for both revolute and spherical joints
- Input Modes: Multiple input methods including sliders, JSON configuration, and external input
- Materials: Pre-configured materials for different hand states
- Demo Scenes: Ready-to-use demonstration scenes
- ROS Integration: Compatible with ROS-TCP-Connector for robotics applications
- Open Unity Package Manager (Window > Package Manager)
- Click the "+" button and select "Add package from git URL"
- Enter the repository URL:
https://github.com/yourusername/unity-hand-package.git
- Download or clone this repository
- In Unity, open Package Manager
- Click the "+" button and select "Add package from disk"
- Navigate to the package folder and select the
package.jsonfile
- Import the package into your Unity project
- Open one of the demo scenes from
Samples~/DemoScenes/ - Configure the HandManager component with your desired settings
- Run the scene to see the hand simulation in action
The main component that manages the entire hand simulation:
- Input Modes: Slider, JSON, or External input
- Configuration Management: Load hand poses from JSON files
- Visual Feedback: Toggle hand visibility
- Fingertip Detection: Find specific hand parts
Individual joint component for single-axis rotation:
- Rotation Axis: X or Z axis rotation
- Input Types: Keyboard, Slider, Manager, or Grasp motion
- Limits: Configurable angle limits
- Settings: Offset, gain, and speed controls
Multi-axis joint component:
- Dual Axis: X and Z axis rotation
- Key Bindings: Customizable keyboard controls
- Limits: Separate limits for each axis
// Get the HandManager component
HandManager handManager = GetComponent<HandManager>();
// Set external input angles
List<float> angles = new List<float> { 30f, 45f, -15f, 60f, 30f, 45f, -15f, 60f, 30f, 45f, -15f, 60f };
handManager.SetExternalInput(angles);
// Toggle visual feedback
handManager.SetVisualFeedback(true);Create a JSON file in your StreamingAssets folder:
{
"configurations": [
{
"name": "Open Hand",
"angles": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
},
{
"name": "Closed Fist",
"angles": [90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90]
}
]
}- Unity 2022.3 or later
- ROS-TCP-Connector (optional, for robotics integration)
HandPackage/
├── Editor/ # Editor scripts and tools
├── Materials/ # Hand materials and textures
├── Prefabs/ # Hand prefabs and 3D models
├── Scenes/ # Demo scenes
├── Scripts/ # Core scripts
│ ├── HandManager/ # Main hand management
│ └── JointManager/ # Joint components
├── StreamingAssets/ # Configuration files
├── package.json # Package manifest
└── README.md # This file
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For questions, issues, or contributions, please visit the GitHub repository or contact Stefano Dalla Gasperina.