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
0
Question by kirubhaUnity3D · Sep 07, 2014 at 01:09 PM · kinectocclusionanimation editor

How to avoiding Occlusion in Humanoid Animation

Hi,I am new to unity3D. I trying to animating human avatar using kinect sensor. i can able to animate the avatar. But the hands and legs are not in stable it moves and goes inside the body area. it means i facing occlusion while animating. How to handle this? . please anybody help me to resolve this......alt text

unityerror.png (49.5 kB)
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Cherno · Sep 07, 2014 at 11:06 PM

Hmm, I don't know anything about kinect, but if the avatar has a skeleton, then you could try giving each bone (or at least the ones giving you trouble) a little script that restricts it's localRotation (actually, use localEulerAngles so you can just set the rotation limits as a Vector3). In the Update() function of the script, you just check if the local rotation is inside the minimal and maximal degree values. Something like this (not tested):

 public Vector3 minRot;
 public Vector3 maxRot;
 
 void Update() {

      Vector3 newRot = transform.localEulerAngles;

      if(transform.localEulerAngles.x < minRot.x) {
          newRot.x = minRot.x;
      }
      if(transform.localEulerAngles.x > maxRot.x) {
          newRot.x = maxRot.x;
      }
      if(transform.localEulerAngles.y < minRot.y) {
          newRot.y = minRot.y;
      }
      if(transform.localEulerAngles.y > maxRot.y) {
            newRot.y = maxRot.y;
      }
      if(transform.localEulerAngles.z < minRot.z) {
            newRot.z = minRot.z;
      }
      if(transform.localEulerAngles.z < maxRot.z) {
            newRot.z = maxRot.z;
      }

      transform.localeulerAngles = newRot;
 }


This could also be made even easier with Mathf.Clamp.

Hope this helps.

Comment
Add comment · Show 2 · 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 kirubhaUnity3D · Sep 08, 2014 at 09:47 AM 0
Share

when applying i getting like this error:

Error 23 Cannot modify the return value of 'UnityEngine.Transform.localEulerAngles' because it is not a variable

avatar image Cherno · Sep 09, 2014 at 12:40 AM 0
Share

I edited my answer by adding a temporary Vector3. In C#. it's not possible to directly change xyz values of position or rotation.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Making a character appear through 1 layer of objects but not 2 or more 0 Answers

Animation Events added with code seem to be at wrong time 0 Answers

Return an array of meshes displayed on screen 3 Answers

Using Automatic Portal Generation, low FPS on PC but high on Apples 0 Answers

Bottleneck not shown in Unity Profiler 1 Answer


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