CS-Senior-Project / AR-Collaboration

CS13: AR collaboration for PCB analysis with VR and Zed Mini
2 stars 1 forks source link

Cross #19

Closed BarryLe closed 4 years ago

BarryLe commented 4 years ago

I create script "raycassting" attaches to both left/right hand. Now you can use the laser point cross the marker area, there will be an indicator object called "mark" shown at the cross position. It will show up when the laser point raycast collide with the marker object correctly and it will be invisible when the laser point hits nothing. Feel free to uncommon debug information in the "raycating" script: //Debug.Log("hit object:" + hit.collider.gameObject.name + "xyz:" + hit.point); // Debug.Log("not hitten"); Then you can press 'tab' key, the VR keyboard will appear as soon as the laser point hit the marker area properly. If it does, enter text and hit 'enter' button on the VR keyboard to add a 3D text object at the hitten position.

Note: Replace the raycasting:86 Input.GetKeyDown(KeyCode.Tab) with GetTrigger() to change the trigger condition. I also fixed the laser point position so that it represents the exactly ray direction.