Fix for Newton tutorial for Irr 1.1 and Newt 1.53

A forum to store posts deemed exceptionally wise and useful
Post Reply
raven_coda
Posts: 89
Joined: Thu Aug 17, 2006 8:11 pm
Location: Salt Lake City, UT, USA
Contact:

Fix for Newton tutorial for Irr 1.1 and Newt 1.53

Post by raven_coda »

I've seen a lot of attempts to fix the tutorial which helped me get started but this should be the complete list of fixes.

replace

Code: Select all

device = createDevice(EDT_OPENGL, dimension2d<s32>(1024, 768), 16, false, true, this);
with

Code: Select all

device = createDevice(EDT_OPENGL, dimension2d<s32>(1024, 768), 16, false, true, false, this);
add

Code: Select all

	boxP0[1] -= 100;
	boxP1[1] += 40;
after

Code: Select all

	NewtonCollisionCalculateAABB (g_newtonmap, &matrix[0][0],  &boxP0[0], &boxP1[0]); 
	// you can pad the box here if you wish
	//boxP0.y -= somevalue; 
	//boxP1.y += somevaluef; 
replace

Code: Select all

NewtonBodySetFreezeTreshold(tmp->body, 1.0, 1.0, 1.0, 1.0); 
with

Code: Select all

NewtonBodySetFreezeTreshold(tmp->body, 1.0, 1.0, 1); 
and finally add

Code: Select all

	tmp->node->setMaterialFlag(video::EMF_LIGHTING, false);
after

Code: Select all

	tmp->mesh = smgr->getMesh("data/smallcube.3ds");
	tmp->node = smgr->addAnimatedMeshSceneNode(tmp->mesh);
	tmp->node->setMaterialTexture(0, driver->getTexture("data/crate.jpg"));
Post Reply