Search Forums
-
You mean a simple cube model? Already tried that, I used the cube from the DX SDK.
-
Okay, so I reduced the terrain bumpiness from 100 to 30 to make it almost flat (although not entirely flat) and created my own little model which feet were centered around the origin.
The results are still as inaccurate as they are with any other model, which yields to unacceptable results where the model is buried half into the ground.
-
No transformations apart from rotation and translation.
I don't know if this model is centered around the origin, the center might also be at the bottom (feet) of the model. But this happens with all models - even if I add an offset to the terrain height (to account for the fact than an object might not be modelled around the origin) - in ...
-
You can multiply the rest of your matrices with a rotation matrix, like this:
Matrix worldMatrix =
Matrix.CreateRotationZ(MathHelper.PiOver2) ...
-
You can post images, go to the HTML mode and enter this code: <img src="url_to_your_image">
-
Hi everyone,
I'm playing around a bit with the terrain content pipeline sample and try to move my character around the terrain using the HeightmapInfo.GetHeight() method.
However, it seems like this method is for some reason incredibly inaccurate. Sometimes my character (the DirectX dwarf model) is flying above the terrain, sometimes ...
-
Take the tool .NET Reflector, you can then examine the XNA dlls yourself, in case you may also want to know how other methods are implemented.
-
They're in object space in the vertex buffer. So you should call Vector.Transform(vertex, matrix) for each vertex of a triangle to transform them into the space (world, view, projection) you want them to be in.
-
I'd use serialization for this task, the XmlSerializer would do a good job here. You may want to take a look at this article.
-
You seriously need to read a book about programming (or C# programming
if that helps with XNA) and learn about the scope of variables. The
variable client is nowhere defined in the current scope, in this case the method LoadContent.
Also, even if it was defined somewhere in your code, an explicit cast like TcpClient tcpClient = ...