Hi,
I can see the debug outline but I can't see the textures on the box. The physics work fine. What am I missing?
Randy
-------------------------------------------------->
struct NewtonCube {
IAnimatedMesh *mesh;
ISceneNode *node;
NewtonBody *body;
NewtonCollision *collision;
NewtonCube *tmp = new NewtonCube;
tmp->mesh = smgr->getMesh("data/smallcube.3ds");
tmp->node = smgr->addAnimatedMeshSceneNode(tmp->mesh);
tmp->node->setMaterialTexture(0, driver->getTexture("data/crate.jpg"));
tmp->collision = NewtonCreateBox(nWorld, 10, 10, 10, NULL);
tmp->body = NewtonCreateBody(nWorld, tmp->collision);
NewtonBodySetUserData(tmp->body, tmp->node);
NewtonBodySetMassMatrix (tmp->body, 10.0f, 150.0f, 150.0f, 150.0f);
NewtonBodySetFreezeTreshold(tmp->body, 1.0, 1.0, 1.0);
NewtonBodySetTransformCallback(tmp->body, PhysicsSetTransform);
NewtonBodySetForceAndTorqueCallback(tmp->body, PhysicsApplyForceAndTorque);
NewtonBodySetMatrix(tmp->body, &dump_location[0][0]);
no textures
-
- Posts: 12
- Joined: Fri Feb 17, 2006 11:53 pm
no textures
ahaha
sorry I asked but I am working from demos because I don't know as much as you do ...
sorry I asked but I am working from demos because I don't know as much as you do ...
Randy
MS .NET 2.0
MS C# 8
MS .NET 2.0
MS C# 8
Is your 3ds file properly textured-uvmapped?
If so, then you don't even need to set the line for its texture:
just placing the jpg at the same level of your 3ds will do. Texture loads automatically.
If so, then you don't even need to set the line for its texture:
Code: Select all
tmp->node->setMaterialTexture(0, driver->getTexture("data/crate.jpg"));
-
- Posts: 12
- Joined: Fri Feb 17, 2006 11:53 pm