Unhandled exception at 0x00431400 in Newtond.exe: 0xC0000005: Access violation reading location 0x08dd7a00.
Here is the code:
Code: Select all
NewtonWorld* nWorld = NewtonCreate();
float min[3];
float max[3];
min[0] = -2000.0;
min[1] = -1000.0;
min[2] = -2000.0;
max[0] = 2000.0;
max[1] = 1000.0;
max[2] = 2000.0;
NewtonSetWorldSize(nWorld, &min[0], &max[0]);
int i = NewtonMaterialGetDefaultGroupID(nWorld);
NewtonMaterialSetDefaultFriction (nWorld, i, i, 0.8f, 0.4f);
NewtonMaterialSetDefaultElasticity (nWorld, i, i, 0.3f);
NewtonMaterialSetDefaultSoftness (nWorld, i, i, 0.05f);
float matrix[4][4];
matrix[0][0] = 1;
matrix[0][1] = 0;
matrix[0][2] = 0;
matrix[0][3] = 0;
matrix[1][0] = 0;
matrix[1][1] = 1;
matrix[1][2] = 0;
matrix[1][3] = 0;
matrix[2][0] = 0;
matrix[2][1] = 0;
matrix[2][2] = 1;
matrix[2][3] = 0;
matrix[3][0] = 0;
matrix[3][1] = 0;
matrix[3][2] = 0;
matrix[3][3] = 1;
NewtonCollision* collFloor = NewtonCreateBox(nWorld, 2, 3, 2, 10, &matrix[0][0]);