I'm trying to get NGD to work in Irrlicht using this http://www.newtondynamics.com/wiki/inde ... Tutorial#1 , but I'm having a bit of a trouble since I'm using NGD version 2.33
I altered
- Code: Select all
nWorld = NewtonCreate (NULL, NULL);
to
- Code: Select all
nWorld = NewtonCreate ();
However I do not seem to know what I should add as an argument to NewtonCreateBox and NewtonCreateBody, as the tutorial didn't take into consideration the "const dFloat *offsetMatrix" as it wasn't in version 1.5 and I'm using version 2.33.
I tried sending NULL but that caused the application to crash.
I also tried adding an offset as follows:
- Code: Select all
dMatrix offset (GetIdentityMatrix());
collision = NewtonCreateBox(nWorld, 0, 0, 0, NULL,&offset[0][0]);
However this is causing another runtime crash, and when I debug it shows me that it happened at this line:
- Code: Select all
boxNode->setPosition(mat.getTranslation());
So I'm assuming I'm filling out the offset matrix in the preceding functions wrong? If so, any advice on how to proceed?
Thank you.