0
Answered

Screen position out of view frustum

Furiant 6 months ago in Game Creator updated 5 months ago 4

I just bought GC and all its addons. I created a new project and imported and enabled all the components. I then added a Player character from the toolbar and did some minor configuration (input keys, etc.), a camera motor, and a terrain. When I click play, the camera spins erratically and the following exception piles up in the log.

"Screen position out of view frustum (screen pos 679.000000, 334.000000) (Camera rect 0 0 994 490)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32)".

What can I do about this?

Unity version:
2019.3.8f1
Game Creator version:
1.1.6

Answer

Answer
Answered

I see where the problem is. You set the Camera Motor inside the Main Camera.

The Camera Motor tries to move according to its behavior. The Main Camera, mimics the Camera Motor movement. However, because you placed the Camera Motor inside the Main Camera, it also inherits the Main Camera movement, which at the same time, copies the Motor's movement, and this in an endless loop.

To fix this, simply unparent the Camera Motor from the Main Camera (move it at the root of the scene).

Cheers!

Are your main camera, camera motor and player root elements of your scene, and not children of anything else or themselves?

The main camera and player are at the root; when I clicked the "Create Camera Motor" button, it added the motor to the main camera. Is that not correct?

Answer
Answered

I see where the problem is. You set the Camera Motor inside the Main Camera.

The Camera Motor tries to move according to its behavior. The Main Camera, mimics the Camera Motor movement. However, because you placed the Camera Motor inside the Main Camera, it also inherits the Main Camera movement, which at the same time, copies the Motor's movement, and this in an endless loop.

To fix this, simply unparent the Camera Motor from the Main Camera (move it at the root of the scene).

Cheers!

I figured this out in the meantime. I wasn't able to get any of the cameras to my liking so I just bought another solution. But I'll know to watch out for this issue in the future if it applies.

Thanks