Very beginner help needed.
Posted: Fri Jun 21, 2013 7:28 pm
Hi Fellas 
Completely new to using a physics engine and creating proper hardcore stuff.
I've followed the basic tutorial( adding a few boxes and ground) but I cannot see the boxes. When I try and add textures to them(using an entitymodel class) i get and error. The error is caused bu the fact that i copied the entitymodel class in the basicsetupdemo demo and requires a separate camera class. As i don't want to complicate things anymore I'm holding of on implementing a camera.
How do I just plain and simply make these boxes visible? cause at the moment I can only see the color blue everywhere, even though the boxes have been added.
These are the lines i'm having trouble with, in my entitymodel class.
Also, i'm not sure whether it's going to "color in" my boxes. I can't see anywhere where the entity model references the boxes :/ should it?
Thanks in advance and sorry for sucking

Completely new to using a physics engine and creating proper hardcore stuff.
I've followed the basic tutorial( adding a few boxes and ground) but I cannot see the boxes. When I try and add textures to them(using an entitymodel class) i get and error. The error is caused bu the fact that i copied the entitymodel class in the basicsetupdemo demo and requires a separate camera class. As i don't want to complicate things anymore I'm holding of on implementing a camera.
How do I just plain and simply make these boxes visible? cause at the moment I can only see the color blue everywhere, even though the boxes have been added.
These are the lines i'm having trouble with, in my entitymodel class.
Code: Select all
{
Matrix worldMatrix = Transform * entity.WorldTransform;
model.CopyAbsoluteBoneTransformsTo(boneTransforms);
foreach (ModelMesh mesh in model.Meshes)
{
foreach (BasicEffect effect in mesh.Effects)
{
effect.World = boneTransforms[mesh.ParentBone.Index] * worldMatrix;
effect.View = (Game as Game1).Camera.ViewMatrix;
effect.Projection = (Game as Game1).Camera.ProjectionMatrix;
}
mesh.Draw();
}
base.Draw(gameTime);
};
Thanks in advance and sorry for sucking
