Ive been going through the demo alot and i have isolated alot of things, once thing i want to utalize is loading Static Meshes and having there physics space add and everything...
This is the original Code with just a tad of changes
Code: Select all
//Load in mesh data for the environment.
Vector3[] staticTriangleVertices;
int[] staticTriangleIndices;
var playgroundModel = Content.Load<Model>("CharacterControllerTestTerrain");
//This load method wraps the TriangleMesh.GetVerticesAndIndicesFromModel method
//to output vertices of type StaticTriangleGroupVertex instead of TriangleMeshVertex or simply Vector3.
BEPUphysics.DataStructures.TriangleMesh.GetVerticesAndIndicesFromModel(playgroundModel, out staticTriangleVertices, out staticTriangleIndices);
var staticMesh = new BEPUphysics.Collidables.StaticMesh(staticTriangleVertices, staticTriangleIndices, new AffineTransform(new Vector3(.01f, .01f, .01f), Quaternion.Identity, new Vector3(0, 0, 0)));
staticMesh.Sidedness = BEPUphysics.CollisionShapes.ConvexShapes.TriangleSidedness.Counterclockwise;
this.PhysicsSpace.Add(staticMesh);
this.BuildingDrawer.Add(staticMesh);
Now i have used this code and it is exactly the same except the model i am loading,
in my example the model loads with no errors and i can clearly tell that there is an invisable object in my realm
so i belive the object is loading just fine, however i cant see i add the object to the physics space and a physics drawer however it is still invisable...
I am using XSI mod tool to model and export as a FBX a house basicly... i thought maybe it was because i had no textures on the house so i created constant textures and created uv maps for them and loaded it and the model is still invisable, but clearly stops the character, (walls)
now, if i load the CharacterControllerTestTerrain into my project it all works fine....
So i was wondering what the steps are to create a model that will load properly? or am i missing somthing else?
Thanks again Norbo u have been awsome in the past!