not working Grip pose or pointing pose position and rotaion
i trying to cast ray from the controller position but its casting ray from another position. i tried changing to local position and local rotation and also just position and rotation but not use.
Vector3 leftPosition = InputTracking.GetLocalPosition(XRNode.LeftHand);
Quaternion leftRotation = InputTracking.GetLocalRotation(XRNode.LeftHand);
RaycastHit raycastHit;
Debug.DrawRay(position, leftRotation * Vector3.forward , Color.red)
if (Physics.Raycast(leftPosition , leftRotation * Vector3.forward, out raycastHit, 10)) {
var cursorPos = raycastHit.point;
Debug.Log(raycastHit.transform.gameObject.name);
}
Comment
Your answer
Follow this Question
Related Questions
Missing Shadows on Some Objects 0 Answers
Particle Collision Bug. 1 Answer
Unity Keeps Destroying My Projects. Please help! (Urgent) 1 Answer
Player keeps bumping when walking over to another sprite 1 Answer
Light Shadow problem 1 Answer