我想在 3D 空间中的特定位置绘制文本和图像。场景以 3D 渲染,我想在 XYZ 坐标上显示渲染的 2D 文本和图像。
我有来自场景和视口的世界、视图、投影矩阵。我不想渲染真正的 3D 字体,也不想显示带有纹理顶点的图像。
我尝试了一些矩阵乘法与变换矩阵,我还尝试使用基本效果作为开始方法的参数。但没有一个对我有用。
eff.World = Graph3DGame.Current.currentWorld;
eff.View = Graph3DGame.Current.currentView;
eff.Projection = Graph3DGame.Current.currentPerspective;
spriteBatch.Begin(0, null, null, null, null, eff);
spriteBatch.DrawString(Fonts.Math, "hello, world!", new Vector2(100,100), Color.Blue);
spriteBatch.End();
希望任何人都可以提供帮助。