Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by CursedScripter · Dec 24, 2011 at 02:25 PM · kinecttrackinginteractivetrackhand

Interactive Kinect Game

I dont really know how the Microsoft Kinect works but i want to make a pretty nice game and i want it to where the player can choose to play interactive and this mode requires a webcam but is it even possible to use a webcam to track hand movements?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by aldonaletto · Dec 24, 2011 at 07:28 PM

Image tracking is a too heavy job to be executed at the script level. You should develop or obtain a tracking image software in DLL form, and integrate it to Unity as a plugin (Pro required).
Meanwhile, you can play around with a very interesting (and free!) software, Camera Mouse. This software controls the mouse pointer using webcam image tracking. As is, it can be used to click GUI buttons - just go to its Settings window and turn camera mouse clicks on: it generates a click whenever the mouse pointer stays in the same region for more than a minimum time; both (the region size and the minimum time) are selectable in the Settings window.
Unfortunately, it doesn't control the "Mouse X" or "Mouse Y" axes directly - but affects mousePosition, thus can be used to aim or move things with some script help. The routines below, for instance, are intended to simulate Input.GetAxis("Horizontal") and Input.GetAxis("Vertical") with head movements - attach to a CharacterController and try it:

// Returns -1 to +1 with head horizontal movement: function GetAxisHorizontal(): float { return (2 * Input.mousePosition.x / Screen.width) - 1; }

// Returns -1 to +1 with head vertical movement: function GetAxisVertical(): float { return (2 * Input.mousePosition.y / Screen.height) - 1; }

// CharacterController script adapted to use cameraMouse:

var speed : float = 6.0; var jumpSpeed : float = 8.0; var turnSpeed : float = 60; var gravity : float = 20.0;

private var moveDirection : Vector3 = Vector3.zero; private var controller : CharacterController;

function Update() { if (!controller) controller = GetComponent(CharacterController); var turn: float = GetAxisHorizontal(); if (Mathf.Abs(turn)>0.3){ transform.Rotate(0, turn turnSpeed Time.deltaTime, 0); } if (controller.isGrounded) { var fwd = GetAxisVertical(); if (Mathf.Abs(fwd) > 0.5){ moveDirection = -fwd transform.forward speed; } else { moveDirection = Vector3.zero; }
if (Input.GetButton ("Jump")) { moveDirection.y = jumpSpeed; } } // Apply gravity moveDirection.y -= gravity Time.deltaTime; // Move the controller controller.Move(moveDirection Time.deltaTime); }

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by SpectralEdge · Dec 24, 2011 at 10:09 PM

Microsoft just opened the Kinect sdk beta recently, it is free for learning (non commercial licences available yet) I played around with it a bit in c# and it does simplify image capturing, and I imagine it would be easy to access the sdk classes with a pro licence.

http://kinectforwindows.org/

It will, of course, only work with windows. Note: You will need a Kinect to program with it, and your end user would need one as well.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Use SteamVR and Vive controller or tracker ONLY for position tracking, no headset 1 Answer

Is it possible to track more then a body with zigfu package in unity with kinect and create an avatar for every person tracked? 0 Answers

Hand tracking with webcam 1 Answer

Motion Tracking With Webcam 2 Answers

Can I use 2 Kinects with Unity to track a single person? 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges