0
지금이 문제에 직면하고 있습니다. 불행히도 모델이 화면에 너무 큰 것처럼 보이고 모델의 상당 부분이 화면에서 사라집니다. 나는 다음 코드들에 변화가있을 것이라고 생각하지만, 이것에 대한 경험이 없기 때문에 나는 어디서부터 시작해야하는지 알 수있다. 제발 조언. 또는 fbx 모델의 해상도/크기를 최소화하면 도움이 될까요? 고맙습니다!전화 7에서 fbx 객체를 볼 수있는 변수를 수정하는 방법은 무엇입니까?
// set up the "camera"
Vector3 cameraPosition = new Vector3(1, 1, 0);
Vector3 cameraTarget = Vector3.Zero;
Vector3 cameraUp = Vector3.UnitY;
float nearClippingDistance = 0.1f; // anything closer to cameraPosition than this won't be drawn
float farClippingDistance = 1000f; // anything farther from cameraPosition than this won't be drawn
float fieldOfView = MathHelper.ToRadians(45.0f); // the vertical angle the "camera" can see
float aspectRatio = (float)graphics.PreferredBackBufferWidth/(float)graphics.PreferredBackBufferHeight;
world = Matrix.Identity; // the model's transform; setting it to the identity means it will display at (0,0,0) with no rotation or scaling
view = Matrix.CreateLookAt(cameraPosition, cameraTarget, cameraUp); // put the camera at cameraPosition, looking at cameraTarget, with cameraUp as the vector pointing to the "sky"
projection = Matrix.CreatePerspectiveFieldOfView(fieldOfView, aspectRatio*40, nearClippingDistance, farClippingDistance); // defines the perspective
// set up the alternative cull mode so that our model draws properly
RasterizerState rs = new RasterizerState();
rs.CullMode = CullMode.CullClockwiseFace;
GraphicsDevice.RasterizerState = rs;
명확히하기 위해 더 많은 정보가 필요하면 알려주십시오. 감사 – aHaH