Unity3d 在团结中限制手部运动的最佳方法是什么?

Unity3d 在团结中限制手部运动的最佳方法是什么?,unity3d,virtual-reality,Unity3d,Virtual Reality,我正在Unity中开发一个VR应用程序,在某些领域,我希望用户的手和手持对象不能通过刚体对象 有没有一种方法可以在没有尴尬/虚无感觉的情况下实现这一点 我目前的想法是(伪代码) 然而,这感觉会给玩家一种无形的感觉 我正在使用一系列教程对于GameDev stack exchange论坛来说,这可能是一个更合适的问题。看起来这更像是一个设计问题,而不是一个代码问题。 public GameObject playerHand; private position handLocation; Mo

我正在Unity中开发一个VR应用程序,在某些领域,我希望用户的手和手持对象不能通过刚体对象

有没有一种方法可以在没有尴尬/虚无感觉的情况下实现这一点

我目前的想法是(伪代码

然而,这感觉会给玩家一种无形的感觉


我正在使用一系列教程

对于GameDev stack exchange论坛来说,这可能是一个更合适的问题。看起来这更像是一个设计问题,而不是一个代码问题。
 public GameObject playerHand;
 private position handLocation;
 Monobehaviour:

 Start(){

 }
 //Store the position of the hand when it enters the collider and keep it there while the VR controller is 'in' the collider
 OnCollisionEnter(collider){
   this.handLocation = playerHand.transform.position;
 }
 
 //Make the hand stop while the player's VR controller is in the collider
 OnCollisionStay(collider){
     hand.transform.position = handLocation;
  }