Can ScreenSpaceLines3D work with OrthographicCamera?

Topics: Developer Forum
Jul 30, 2008 at 2:56 AM
It always display nothing when I try to use OrthographicCamera.

<Window x:Class="Test.Window1"
    Title="Window1" Height="463" Width="679">
                <OrthographicCamera Position="1,1,1" LookDirection="-1,-1,-1" UpDirection="0,1,0" Width="20"/>
            <tool3d:ScreenSpaceLines3D Points="0,0,-6 0,0,6" Color="Red" Thickness="2"/>
            <tool3d:ScreenSpaceLines3D Points="-6,0,0 6,0,0" Color="Red" Thickness="2"/>

Is it because I didnot set up the camera well or the ScreenSpaceLines3D cannot work with OrthographicCamera?
I searched many samples, but it seems that all of them are using PerspectiveCamera.

Thanks for your help.

Aug 28, 2009 at 2:39 PM

Simple solution is to set the FarPlaneDistance of the camera. For example to some very large number.


By default, the FarPlaneDistance is infinity, which causes an error in MathUtils.GetProjectionMatrix for the OrthographicCamera.

Feb 29, 2012 at 4:07 PM

Thanks alot, Joozt