Git Product home page Git Product logo

vrarmik's Introduction

VRArmIK

VRArmIK brings arms into VR without any additional tracking devices. Using head and hand positions, the shoulders and arms are estimated to create realistic arm movements.

See the Video on Youtube

Features

  • VR Tracking to Wrist and Neck estimations (currently only optimized for Oculus Touch)
  • Estimates shoulder position and orientation
    • 360° movement
    • crouching
    • distinct shoulder rotations when stretching the arms to their limits
    • arm dislocation when the distance between shoulders and controllers is larger than the virtual arm
  • Simple Arm IK Solver which connects shoulders with hand target positions
  • Complex Elbow Angle calculations
    • many variable to optimize the IK for different use cases
    • prevents unrealistic hand rotations

How To Use

  1. Download package from Unity Asset Store
  2. Add PoseManager and Avatar Prefab into your scene
  3. Run

Take a look at the Demo scene to see a working demo.

Tips & Tricks

  1. If the code does not compile, make sure that the Scripting Runtime is set to .NET 4.6 instead of 3.5. Unity Manual
  2. If the shoulders are always (or never) facing downwards, try using Unity's "Camera OFfset" with tracking mode set to "Floor" and camera Y offset set to 0. If you do so, you also need to follow the next step:
  3. If the avatar is a couple of meters below your head, try setting the "Vr System Offset Height" in the PoseManager to 0.

If you have any other questions, please open an issue in the issue tracker.

vrarmik's People

Contributors

dabeschte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vrarmik's Issues

Oculus Hands

Hello,

I love this plugin, and am trying to use it to build a VR game for Oculus Rift/Quest. I would like to use the Oculus hand prefabs with this plugin, but I don't know how to set them up without breaking it. It almost works right if I child the hand prefabs to the Hand transform in your supplied arm prefab, but when the editor runs the hands usually generate way out of place with no way to bring them back closer. Do you have any idea why that might be or have any experience working with the Oculus samples?

Thanks,
Joe

Avatar Facing Down

I know this problem was in the readme, but it was just explained so poorly. My problem is that the avatar is facing downwards which screws up the entire system. I need a better explanation on how to fix this. Thanks.

Not working with the latest version of Unity XR

I can't seem to get the demo scene working with the latest Unity XR package (Unity 2019.4, XR plugin management version 3.2.16)
I noticed that The method:
UnityEngine.XR.InputTracking.GetLocalPosition(node)
is obsolete. This may be the cause of the issue?

Custom Scaling

Hi, thanks for developing this plugin!

I want to use it for a VR game where the player's camera rig will be scaled up. As a result the avatar and shoulder objects will have to be scaled to match, however this causes a lot of things to go wrong. Would it be possible to make your solution work at a scale of say, 15x on all axes?

Thanks in advance

RotateShoulderUp calculation appears incorrect when forwardDistanceRatio is negative and distinctShoulderRotationLimitBackward is not 0

I've been working on porting your code to Unreal, and while looking through I found this code which looks wrong:

targetAngle.y = Mathf.Clamp(-(forwardDistanceRatio + 0.08f) * distinctShoulderRotationMultiplier * 10f,
-distinctShoulderRotationLimitBackward, 0f);

forwardDistanceRatio is guaranteed to be negative here, so flipping it and then clamping with a max of 0 will ensure that the yaw will be 0 if forwardDistanceRatio is less than -0.08.

Note that although it does appear that this line is incorrect, it doesn't matter as long as distinctShoulderRotationLimitBackward is 0.

public float distinctShoulderRotationLimitBackward = 0f;

If distinctShoulderRotationLimitBackward is not 0, the way the thresholds are set up, it would look something like this... (scaled to the appropriate limits and multipliers)
image

The discontinuity would cause a shoulder pop, I imagine...

SteamVR glove hand replacement not behaving as desired

Hey, i'm having a similar issue with the SteamVR_Input as issue #2, i've replaced the original hand with the Steam_VR vr_glove prefab, attached a mesh collider to my vr_glove and now skeleton poses are working with the VRarmIK, my only issue is the glove is now deformed and at the wrong angle, do you have any recommendations to fix this? (I know the repository is not regularly supported but this may help someone in the future)

Hands behind head isn't accurate and causes odd shoulder rotations

Hi again! I've been running into this issue consistently and have only managed to come up with hacky solutions that aren't quite ideal.

The problem is that when the "Hands Behind Head" bool switches to true, it occasionally doesn't switch back, despite the player holding their hands to neutral positions directly in front of them. This causes the shoulder to stay rotated to it's maximum value, causing all sorts of wonkiness. This can easily be replicated in the demo scene by drawing a circle around your head with only one hand. You essentially need to "unwind" the circle or throw both hands behind your head again to get the shoulder back to it's correct position and for the bool to switch back.

This is particularly frustrating as it can occur when climbing overhangs and using weapon holsters in the over-the-shoulder position. Any suggestions for better handling this?

shoulderrot

Full body avatar rotations won't rotate shoulders

Hi and thanks for the awesome asset! In my project I have the player set as the child of a moving object, specifically the cockpit of a ship. The ship is able to move and rotate freely, and the player follows its position perfectly, but when the ship rotates on the X and Z axes, the Shoulder object under the Avatar does not follow and instead remains vertically oriented in the world (so when the ship is upside down, the player's body now appears to be above their head). My desired behavior is for the entire avatar to stay locked to the ship's orientation (so if the player remains perfectly still while the ship does a flip, the avatar should remain perfectly fixed in place relative to the player's perspective). I've managed to get as far as locking the Shoulder's local X and Z rotations to the ship's orientation, but then the Shoulder will still rotate on it's local Y axis unexpectedly during flips. Do you have any tips or ideas on how this could be solved?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.