So for the last hour I’ve been researching how to fix the the following error:
Screen position out of view frustum (screen pos 761.666626, 770.666626) (Camera rect 0 0 1920 1080)
UnityEngine.SendMouseEvents:smile:oSendMouseEvents (int)
I tried all of the things people said from closing and reopening scene tab, deleting auto generated camera, check camera size/clip plane etc and nothing worked. I found the line of code causing the error but it makes no sense as to why it would cause this error because it has nothing to do with the camera. I don’t have any code in this project that affects the camera behavior and I am using a cinemachine brain attached to my main camera.
void setRigidBodyState(bool state)
{
Rigidbody[] rigidbodies = GetComponentsInChildren<Rigidbody>();
foreach (Rigidbody rigidbody in rigidbodies)
{
rigidbody.isKinematic = state;
}
GetComponent<Rigidbody>().isKinematic = false; //this line is causing the issues
}
This method is called in start to set all of my ragdolls rigidbodies to kinematic or not depending on ragdoll state. I don’t want the main rigidbody to ever be set to kinematic in either case which is why that last line is there. Any idea why that line would cause a camera error?