Search code examples
wpf3dcameradirection

In what coordinate system the Camera.LookDirection is located?


I have a figure at the origin point (0 0 0). So I setup my perspective camera like

<PerspectiveCamera Position="0 0 10" LookDirection="0 0 0" UpDirection="0 1 0" />

But there is nothing to see. How it can be? I look straight to the origin point from my position point!

Only one thing can explain this: the LookDirection is located in the Position's coordinate system (CS), i.e. the Position is the origin point of the local CS in which the LookDirection exists. So the Position is in the global CS, and the LookDirection isn't in the global CS. But I don't meet with that explanation in MSDN. Why they don't tell about that?

Am I right or not?


Solution

  • You should change LookDirection="0 0 0" into LookDirection="0 0 -1"

    Check the documentation, LookDirection is a vector, not a location.