Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetPoseActionData returns VRInputError_WrongType #847

Closed
ltorroba opened this issue Aug 3, 2018 · 3 comments
Closed

GetPoseActionData returns VRInputError_WrongType #847

ltorroba opened this issue Aug 3, 2018 · 3 comments

Comments

@ltorroba
Copy link

ltorroba commented Aug 3, 2018

I have setup an action, in my action manifest, that is bound to the pose:

{
    "name" : "/actions/main/in/rotate_pose",
    "type" : "pose"
}

However, whenever I try to obtain the data from this pose, I get a VRInputError_WrongType. Still, I can't see the issue.

InputPoseActionData_t action_data = {};
EVRInputError error = VRInput()->GetPoseActionData(action_handle_rotate_pose, TrackingUniverseSeated, 0.0f, &action_data, 1);
if (error != VRInputError_None)
    throw std::exception("Cannot get action state.");  // Will always throw

Other actions seem to be working, so it must be something specific to this action.

Could this be due to this action not being bound? (I have tried to find out how to bind poses in the SteamVR controller interface but I have so far not been able to find any options for it, so I just assumed that it would bind it automatically). If so, how do I bind poses in the interface?

Any help would be really appreciated.

@Zamundaaa
Copy link

The same happens for me, too. I assume it has to be bound... I haven't managed to create a binding for my game due to some bug (or perhaps due to something I did wrong) but it's normally bound manually in the interface in vr or at http://localhost:8998/dashboard/controllerbinding.html. This is so you could add more trackers as replacements for poses etc.

@Zamundaaa
Copy link

Soo I can now create bindings and now I still always get a VRInputError_WrongType, even though my pose action is bound to raw left & right controller poses like in the legacy or hellovr sample controller bindings. The workaround I use for now is that I get the poses with GetWaitPoses but that's neither a solution for this problem nor good to use

@JoeLudwig
Copy link
Contributor

JoeLudwig commented Apr 26, 2019

EVRInputError error = VRInput()->GetPoseActionData(action_handle_rotate_pose, TrackingUniverseSeated, 0.0f, &action_data, 1);

That last argument is meant to be the size of the struct you're passing on. Change 1 to sizeof( action_data).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants