毛.sy 0 Posted October 12, 2020 I enlarged the camera by 7 times, and then the hand position was wrong. Could you please tell me how to solve this problem? Thank you Share this post Link to post Share on other sites
zzy 17 Posted October 12, 2020 Hi @毛.sy We don't support changing camera scale in the current version. Can you please share your use case why you need to scale the camera in a VR application? Can you please verify if setting camera scale to (1,1,1) can solve the problem? Share this post Link to post Share on other sites
毛.sy 0 Posted October 13, 2020 Hello @zzy For some reasons, I had to enlarge the scene, so the camera was also enlarged by 7 times. However, after I enlarged the model of the camera and the hand, I found that the movement distance of the hand was still scale=1. Therefore, I would like to ask how to set the enlarged movemeHand_Tracking_Unity_CameraTest.unitypackagent distance of the hand。Thank you Share this post Link to post Share on other sites
zzy 17 Posted October 15, 2020 Hi @毛.sy Can you please try if the following changes solve your problem? Please change UpdateResult function in Assets\ViveHandTracking\Scripts\Engine\ViveHandTrackingEngine.cs to: public override void UpdateResult() { var transform = GestureProvider.Current.transform; IntPtr ptr; int index; var size = GestureInterface.GetGestureResult(out ptr, out index); if (index < 0) { Debug.LogError("Gesture detection stopped"); State.Status = GestureStatus.Error; State.Error = GestureFailure.Internal; return; } if (index <= lastIndex) return; lastIndex = index; if (State.Status == GestureStatus.Starting) State.Status = GestureStatus.Running; if (size <= 0) { State.LeftHand = State.RightHand = null; return; } bool isLeft = false; var structSize = Marshal.SizeOf(typeof(GestureResultRaw)); for (var i = 0; i < size; i++) { var gesture = (GestureResultRaw)Marshal.PtrToStructure(ptr, typeof(GestureResultRaw)); ptr = new IntPtr(ptr.ToInt64() + structSize); for (int j = 0; j < 21; j++) gesture.points[j] = transform.TransformPoint(gesture.points[j]); State.SetRaw(gesture); isLeft = gesture.isLeft; } if (size == 1) { if (isLeft) State.RightHand = null; else State.LeftHand = null; } } Share this post Link to post Share on other sites
毛.sy 0 Posted October 16, 2020 @zy Sorry, I didn't see it yesterday. I tried it and it was ok. Thank you very much Share this post Link to post Share on other sites
zzy 17 Posted October 16, 2020 Hi @毛.sy Good to know it's working. I will include this change in the next release. Share this post Link to post Share on other sites