单游戏3D-三角形不是';当中心Y<;大约-2.0

单游戏3D-三角形不是';当中心Y<;大约-2.0,3d,xna,monogame,3d,Xna,Monogame,我有一个小的代码库,您可以在上看到完整的代码。我将尝试在这里输入相关代码。基本上,如果我移动一个三角形的位置,这会改变世界矩阵,它就不可见了。有什么想法吗 GraphicsDevice.RasterizerState.CullMode = CullMode.None; this.vertices = new[] { new VertexPositionColor(new Vector3(1.0f, -1.0f, 0.0f), color), new VertexPosition

我有一个小的代码库,您可以在上看到完整的代码。我将尝试在这里输入相关代码。基本上,如果我移动一个三角形的
位置
,这会改变世界矩阵,它就不可见了。有什么想法吗

GraphicsDevice.RasterizerState.CullMode = CullMode.None;

this.vertices = new[]
{
    new VertexPositionColor(new Vector3(1.0f, -1.0f, 0.0f), color),
    new VertexPositionColor(new Vector3(-1.0f, -1.0f, 0.0f), color),
    new VertexPositionColor(new Vector3(0.0f, 1.0f, 0.0f), color)
};

this.effect.Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4,
            device.Viewport.AspectRatio, 0.001f, 50.0f);
this.effect.View = Matrix.CreateLookAt(Position, Vector3.Down, Vector3.Forward);
this.effect.World = Matrix.CreateTranslation(entity.Position);

foreach (var pass in this.effect.CurrentTechnique.Passes)
{
    pass.Apply();
    this.device.DrawUserPrimitives(PrimitiveType.TriangleList, this.vertices,
        0, 1);
}

最后的问题是,我的远剪辑离我画三角形的地方太近了(我是在远剪辑上画的)

简单