Quantcast
Channel: Answers by "mikewarren"
Viewing all articles
Browse latest Browse all 57

Answer by mikewarren

$
0
0
I'm not sure I understand your question, but I think your confusing the scene world space with tracking space in whatever XR input system you're using. There is no world tracking coordinate because the tracking system isn't part of the scene. It's apples and oranges. The easiest way to I know to integrate tracking is to create an empty game object that represents your tracker origin (if you're using a Rift or Vive and a standing/room scale experience, this is usually some point on the floor where you initialized your system) in world scene coordinates. Then, add empty game objects for each XR tracked node. Create a script to update those node objects with tracker positions. You can then query those objects for world position. If you want to navigate the scene beyond your tracking area, you implement some sort of motion model that moves that tracking origin object in the virtual world. I'd re-examine why you don't want to use parenting. The easiest way to grab the sword in your example is to parent it to one of your hand game objects with a zero offset. It'll move with your hand. But, if you really don't want to maintain a hierarchy, a script to set the world position of the sword with the world position of the hand game object is easy.

Viewing all articles
Browse latest Browse all 57

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>