-
Notifications
You must be signed in to change notification settings - Fork 218
Fixed the second controller doesn't show up problem #989
Fixed the second controller doesn't show up problem #989
Conversation
fdb4a16
to
cb90afd
Compare
cb90afd
to
b5702f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this code would benefit from some clean up. I wonder if we could make it more flexible by keying off the reported caps instead of the type? And only use the type for the controller model file mapping?
@@ -44,7 +44,7 @@ struct ControllerContainer::State { | |||
} | |||
|
|||
void SetUpModelsGroup(const int32_t aModelIndex) { | |||
if (models.size() >= aModelIndex) { | |||
if (aModelIndex >= models.size()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch.
// the current workaround is checking if it is Quest. | ||
return IsOculusQuest(); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find having two different Is6DOF()
functions confusing. Also is it possible to use a Go 3DoF controller with 6DoF headsets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of Is6DOF()
is for controllers, and the other one is for headsets. Currently, we only use ControllerState.Is6DOF()
for getting the capability from controllers. We didn't have Is6DOF()
requirement for headsets yet, I just prepare it for the future. Ideally, ovrInputHeadsetCapabilities
should tell us the capability flag of headsets, but it doesn't work right now, and I have checked OVR mobile samples are also under the same situation.
I have done a try for using Go 3DOF controller with the Oculus 6DOF headset, I didn't see any possibility.
yep. That's what I was doing. Probably, I am not doing good enough :) |
Per #977. We find the second controller does not show up intermittently, and I notice it is because the
model
vector ofControllerContainer.cpp
is not resized properly.