-
@maluoi Hi Nick. Trying to understand the initial Pose that SK determines for a simple app with a single scene. Running in the computer (not HL2). It appears when the SK app starts it grabs a pose from Input.Head (position 0,0,0 and orientation 0,0,0,1) on the constructor call. Then In the SK's call to the Initialize() function, the same call to Input.Head returns a different orientation. I don't understand why this is happening, certainly nothing has manipulated the Head position or rotation in the time it takes to call the constructor and then the scene's Initialize method. Is SK doing something to the initial orientation? My problem. In my app I have a number of siblings drawing objects. Most of the time I am placing them at a position is space, in a pose where the orientation is from angles (0,0,0) This discussion is a little vague, I know. A hierarchy is just not possible to "contain/relate spatially" all the objects. There exist logical relationships the user creates by his actions. The user expects these to remain spatially locked while other objects remain where they are in space. I have a particular use case where the user must position testing areas (zones of space) relative to real world workbenches with real objects on the bench that are to be tested by a technician. Associated with these test areas are several menus, data screens, and 3D models. The workbenches are arbitrarily spatially related to the app's initial position. I am "registering" the spatial locations at runtime. To make this work it seems that I must know the app's initial position/orientation and then translate and rotate the objects. That has proven to be difficult get the angles necessary. It seems that there must be some absolute initial position that the app has and maintains. When I turn say 90 degrees right and I want the objects to reposition to my new orientation with the same relative spacing, it seems that I need to calculate a rotation of the "world" for the app and then calculate each sibling's new pose orientation. I know that I could wrap them all in a hierarchy but there are two things that prevent this, one the objects are not related programmatically, two each has its own associated hierarchy. Imagine several independent business processes that are unrelated except that the user wants them to be visible and actionable. It is sort of like have multiple app running on your computer at the same time on different monitors. Only in the 3D world these need to be moveable as the user decides. Ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
If you are doing: Check(Input.Head);
SK.Initialize(settings);
Check(Input.Head);
SK.Run(()=>{
Check(Input.Head)
}); I would consider the first Regardless of which reference space / origin mode your application chooses, the head will almost never be there on startup either, since there's always at least a few milliseconds difference between initialization and input polling. With In general, you want to pick an appropriate If you want to maintain the position of objects in the real world, I'd recommend using |
Beta Was this translation helpful? Give feedback.
-
Thanks Nick, as always, I learn something new. |
Beta Was this translation helpful? Give feedback.
If you are doing:
I would consider the first
Check
call to be invalid, as there is no OpenXR session present to provide a head pose. The secondCheck
happens before SK polls inputs, but may provide a valid identityPose
at least. The third one will have relevant input data.Regardless of which reference space / origin mode your application chooses, the head will almost never be there on startup either, since there's always at least a few milliseconds difference between initialization and input polling. With
SKSettings.origin = OriginMode.Local
, it may possibly be close, especially if you'…