Ground problems
BlitzMax Forums/MiniB3D Module/Ground problems
| ||
I am trying to create a flat ground for my little test game I'm working on. I tried using CreateCube to make a quick mesh, then use ScaleMesh or ScaleEntity to make it 200, 1, 200, and finally use EntityTexture to texturize it (or even EntityColor to color it). But, when I move the camera around it alternates between blackness and the texture or color.Global ground:TMesh=CreateCube() ScaleMesh ground, 100, 1, 100 PositionEntity ground, 0,0,0 EntityType ground, 2 EntityTexture ground, tex[0] ' or EntityColor ground, 255,255,255 I tried another way, which was creating several different meshes, and using AddMesh to combine them. This looks fine, but collision stops working after I make the mesh too big (like more than about 160 X units by 160 Y units). Any suggestions on what I could do differently? |
| ||
you might have to keep placing your 'addmesh' mesh back at 0,0,0 all the time, if no-one else has any better suggestions |
| ||
I am using a plane mesh created with Milkshape and it works fine. When using a cube may be worth trying to use fitmesh: "Scales and translates all vertices of a mesh so that the mesh occupies the specified box. Do not use a width#, height# or depth# value of 0, otherwise all mesh data will be destroyed and your mesh will not be displayed. Use a value of 0.001 instead for a flat mesh along one axis." |