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
Destroying objects that the Client sim is currently looking at seems to break the Client sim.
This seems to be a Client sim issue and does not occur in VRChat.
Test:
I added a script to a cube which destroys the attached gameObject in the Interact() function. When looking at the cube and interacting with it, the Client sim breaks. Note: This also seems to happen when the GameObject is destroyed through other means such as the Editor or the Update function.
I followed the error messages and I was able to avoid the issue by modifying 2 files.
Note: I have not looked into the architecture of the code. So this is probably neither nice nor reliable.
public void UpdateTooltip(Vector3 playerPos, Vector3 up)
{
// Added try catch block since Interactable.GetInteractTextPlacement() fails when the GameObject has been destroyed
Vector3 position = Vector3.zero;
try
{
position = Interactable.GetInteractTextPlacement();
}
catch (MissingReferenceException e)
{
Debug.LogWarning($"Avoided exception: {e}");
}
// Rotate to look towards the player while keeping the proper up direction.
// VRChatBug: Build 1160 has this broken again so that rotating the player through stations does not properly rotate tooltips.
Quaternion rotation = Quaternion.LookRotation(Vector3.ProjectOnPlane(playerPos - position, up), up);
transform.SetPositionAndRotation(position, rotation);
}
Destroying objects that the Client sim is currently looking at seems to break the Client sim.
This seems to be a Client sim issue and does not occur in VRChat.
Test:
I added a script to a cube which destroys the attached gameObject in the Interact() function. When looking at the cube and interacting with it, the Client sim breaks. Note: This also seems to happen when the GameObject is destroyed through other means such as the Editor or the Update function.
Video: https://www.youtube.com/watch?v=v583uamE2_c
Ugly hotfix:
I followed the error messages and I was able to avoid the issue by modifying 2 files.
Note: I have not looked into the architecture of the code. So this is probably neither nice nor reliable.
ClientSimTooltip.cs
ClientSimHighlightManager.cs:
The text was updated successfully, but these errors were encountered: