Viewport.Project position issue

Hi there.

I’ve finally got around to testing the Viewport.Project function for text and texture drawing in position of 3D models.

What I’m getting is almost correct. It’s as if the result is slightly ahead of the projection.

If you take the classic starfield screen saver, then draw a line between all points (only a few points) you have your 3d models (stars) and lines as a lattice. But the lines are coming towards me on a future projected, predicted point.

I’m calculating the 2d/3d matrix every update with each object world update, the projection matrix isn’t changing, the View matrix isn’t changing.

Do I need some kind of matrix division around the field of view?

I can see other posts where people say they’ve almost got this working, then no further updates.

Any ideas welcome.

Sorry, just messing about with stuff randomly, I found dividing the source position Vector3 by 100 seems to give me something fairly accurate, not spot on but close. Nothing in any of the tutorials I’ve seen mention supplying the source as a percentage.

This has nothing to do with the Z value, all objects are in front of the camera and between the two planes.

So, now I’m a bit confused!

Without seeing your code or math it is difficult to assist. What exactly are you trying to do?

It sounds like you’re trying to do the equivalent of billboards with text. That is straightforward but there are a few details to get correct.