-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Axis Enumeration #27
Comments
Hello Jeff. The Axis enumeration represents an axis in the Camera Space (measured in meters). If you pass it as a parameter in the Angle method, for example, the specified axis will be ignored for the angle calculation. Let me know if you need any further assistance. |
What I'm trying to do is get body relative angles and it seems like what Angle is providing is screen/camera relative angles. For instance I'd like to measure the pitch/elevation of my arm which shouldn't change as I spin around in a chair if I'm holding my arm straight out in front of me. |
Could you please paste the code you are using for this? |
I was trying to get body relative elbow yaw doing something like this:
I tried using the different axes but since they're relative to the camera (and not the body or gravity) I don't think think this is the right path. |
Thank you. Could you also send me a video of the movement and the proper
|
Now it's clear to me. So, to read the angle regardless of the rotation of the body, you need to measure it by considering all of the axis. Would the following code work for you?
You may also do this:
|
I'm pretty sure that's still going to be measuring in screen/camera space and not body/floor/gravity space. So for instance if I stand with my body facing the camera and point my arm at the camera and then move it down by my side the angle doesn't change much. If I rotate my body 90 degrees and do the same motion the values sweep through a large range. |
I have a pretty good solution in Unity based on the JoinOrientationBasics-Unity example. I'm simply looking up a child of the SkeletonModel, in this case "ElbowRight", that is already converted into Unity coordinates and extracting the yaw as: |
The documentation for Axis Enumeration says it "Represents an axis from the 3D space"; is this body coordinates, camera coordinates or perhaps gravity/floor aligned coordinates? I'm trying to understand what effect passing in an Axis should have on the Angle.
The text was updated successfully, but these errors were encountered: