Pose binding and 2018.3
Hello,
I am currently working on a VR project, using 2018.3.0b9. I've bound multiple actions and also had the poses working for both controller, but since today the Poses are not send to unity. In the steam menu the controllers work fine. The boolean actions also still work, just the poses stopped working. Rebuild actions multiple times already, doesn't seem to fix it though.
Also I have a problem with the openvr package. Without the package, VR doesn't transfer to the steamvr application at all but the openvr_api script has errors complaining that there isn't a openvr_api.dll. I added the dll manually to the folder local Plugins folder, but now Unity complains that there are multiple dlls. Without the package VR doesn't work at all, without the other the script complains.
Thanks a lot in advance. Best regards
Sorry, this sounds like more of a unity issue. I would recommend trying the most recent version of the beta plugin here: https://github.com/ValveSoftware/steamvr_unity_plugin/releases/tag/2.1.5 You'll definitely want the openvr package. Not sure why it isn't being detected properly.
Upgraded to 2.1b8 earlier, fixed the dll problem, though the poses still arent working properly. I'll try the new 2.1.5b2 tomorrow and will report after that. Just one more question, I'm trying to get full body tracking working with 5 trackers on their own. How do you bind poses to individuel trackers each one keeping their choosen position on the body?
OpenVR package is working properly now, but the Pose bindings stopped working at all. I need the Pose binding for the angular velocity of the controller, but I have to use the old SteamVR tracked object, where I can't access the angular velocity.
With the beta version of the plugin you should be able to then bind poses to specific trackers in the binding ui. Be careful you aren't using scripts from the old version of the plugin with stuff from the new system, they won't work at the same time.
Ok, after testing around quite some time, i found a "solution". Working with the new Pose seams to be rather tedious, not working sometime when SteamVR is started from steam and not from unity, having some problems of losing preset actions that have been bound and also not tracking the trackers, with the default Pose Behavior script. Though i dont know why, the Pose Behavior works for Controllers, but not for the trackers. I fixed it by using the following code, which is almost exactly the same as the default Pose Behavior, though this fixed one works and the other doesnt with trackers. I hope i can help some people with that as a hot fix for now.
public enum UpdateMode
{
Update,
FixedUpdate
}
public SteamVR_Action_Pose actionPose;
public SteamVR_Input_Sources source;
public UpdateMode updateMode;
public Transform origin;
void Update()
{
if (updateMode == UpdateMode.Update)
{
transform.position = origin.transform.TransformPoint(actionPose.GetLocalPosition(source));
transform.rotation = origin.rotation * actionPose.GetLocalRotation(source);
}
}
void FixedUpdate()
{
if (updateMode == UpdateMode.FixedUpdate)
{
transform.position = origin.transform.TransformPoint(actionPose.GetLocalPosition(source));
transform.rotation = origin.rotation * actionPose.GetLocalRotation(source);
}
}
Closing as this issue appears to have been resolved.