-1

I have a .NET Framework 4.8 application that shows a 3D object.

I would like to add a fixed Object that always stays in the top left corner, regardless of the move/rotate/zoom of the main model.

Does anyone can help me with the matematic needed to manipulate view matrix to find the point in world coordinates XYZ to get always the same point in viewport corrdinates X'Y' for example P(200;150)

4
  • 1
    SlimDX's website is offline and the archive copy of their documentation website doesn't load for me (script errors, hurrah). I might recommend you start-over using a Direct3D lib that's not a dead project - or use Direct3D via COM directly from C# if you can stomach it. Commented Dec 11 at 14:29
  • 2
    "I am able to create a Cube, make it semi-transparent and place it in the world coordinates" - Methinks it'd be easier to render and/or composite it separately. Commented Dec 11 at 14:31
  • SlimDX or SharpDX are not the main problem. I edited the question to focus on manipulating view matrix to find the point in world coordinates to get always the same point in viewport corrdinates Commented Dec 11 at 15:54
  • You can simply take the inverse of the view/projection matrix to translate from viewport to world coordinates. That will result in a ray, not a point, so you need to fix the distance. But this seem unnecessarily complicated, if you are using a low level library you can just render the world as normal, and then change the view/projection matrix to draw in screen space for the overlay. Commented Dec 15 at 12:19

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.