UnityRenderStreaming
UnityRenderStreaming copied to clipboard
[BUG]: screen position out of view frustum (screen pos 0.000000, -nan)
Package version
3.1.0-exp.6
Environment
* OS: Ubuntu 18.04
* Unity version: 2020.3.3f1
* Graphics API: vulkan
* Browser: chrome 115.0.5790.102
Steps To Reproduce
- Use broadcast sample, start webapp
- Sometime unity editor will occur this error message"screen position out of view frustum (screen pos 0.000000, -nan)"
Current Behavior
No response
Expected Behavior
No response
Anything else?
After debug, I have found that this error is caused by the below code.
# Runtime/Scripts/InputPositionCorrector.cs
unsafe void PointerMap(StateEvent* data, InputDevice device)
{
switch (device)
{
case Mouse mouse:
MouseState* mouseState = (MouseState*)data->state;
mouseState->position = Map(mouseState->position, inputRegion, outputRegion);
break;
case Touchscreen touch:
// todo(kazuki): multi touch is not supported yet.
TouchState* touchState = (TouchState*)data->state;
touchState->position = Map(touchState->position, inputRegion, outputRegion);
break;
}
}
The mouseState->position
sometime will be (0, NAN)
Hope to fix in newer version, thanks
@gawinwong Thank you, let me check.