Mouse click broken with orthographic camera with large negative near clip plane

I’m pretty sure this is a bug.

I’ve set up a scene with an orthographic camera. I’ve set my “Near Clip Plane” to be -10000000.0, and my far clip plane to be 100000000.0. I have a scene with actors located at Y=0, and my camera is looking down the y axis, located at Y=1000.

Mouse click events, or cursor traces, do not work and don’t register the actors/objects under them. If I set my “Near clip plane” to be “1000.0” instead, then mouse click events start working.

Followup: This also happens if “Far Clip Plane” is some very very large value as well.

Also the function “Get Hit Result Under Cursor by Channel” does not work either using these very large values. I’m assuming that the mouse click events call this function under-the-hood anyways, so probably the same issue.

Hello scyfris,

I was not able to reproduce this issue on our end. I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. Could you provide a detailed list of steps to reproduce this issue on our end?
  3. Could you provide screen shots of any settings/blueprints that may be involved with this issue?

Hi ,

Thanks for the quick follow-up. After debugging a bit more, I think I’ve determined this isn’t a bug after all, but related to my PlayerController’s field “Trace Distance” in the “Mouse Interface” section of the class defaults. If I bump that up to be larger than the distance from the camera’s Ortho Near Clip Plane to the object I wish to detect with the mouse click, then it seems to work.

I guess the PlayerController’s “Trace Distance” is defaulted to “100000.0” to account for most viewing areas, but my camera’s near clip plane was much further than the default value accounted for.

Anyways, I believe this can be marked as “Resolved”.

Thanks!

Hi , see my “answer” post.

Thanks!