You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project in which a ResetButton is attached to an object that is moved once the project is running (and after Start() is called to cache the positions). When the button is pressed and then released the resetPoses cached in ResetButton.Start() are restored by OnColliderEventPressUp and cause the button to teleport to its original location in the scene.
I was able to reproduce the problem in the ColliderEvent.unity project that comes with VIU. Just start the example and then move the "ResetButton" object a bit. Then press and release the big red button and it will jump back to its original position.
I fixed the issue by simply doing what Start() does in OnColliderEventPressEnter and it seems to work fine. I've opened pull request #115.
The text was updated successfully, but these errors were encountered:
JeffBail
added a commit
to JeffBail/ViveInputUtility-Unity
that referenced
this issue
Apr 17, 2019
CachePositions() was created to allow the buttonObject and effectTargets position caches to be updated from OnColliderEventPressEnter. This allows the host of the ResetButton to be moved at runtime. If the cache is not updated the objects would end up getting moved to their start position in the scene after a button press. This is a fix for issue ViveSoftware#114.
The fix worked for the buttonObject, but not for the effectTargets which get restored to their original location in the scene instead of their position at the time of the button press. I've submitted a new pull request - pull #117.
I have a project in which a ResetButton is attached to an object that is moved once the project is running (and after Start() is called to cache the positions). When the button is pressed and then released the resetPoses cached in ResetButton.Start() are restored by OnColliderEventPressUp and cause the button to teleport to its original location in the scene.
I was able to reproduce the problem in the ColliderEvent.unity project that comes with VIU. Just start the example and then move the "ResetButton" object a bit. Then press and release the big red button and it will jump back to its original position.
I fixed the issue by simply doing what Start() does in OnColliderEventPressEnter and it seems to work fine. I've opened pull request #115.
The text was updated successfully, but these errors were encountered: