How do i use NewtonCreateCompoundCollision correctly?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

How do i use NewtonCreateCompoundCollision correctly?

Postby Xaymar » Wed Dec 22, 2010 9:51 pm

Currently i am creating an Array of NewtonCollision* like this:
Code: Select all
               iCount[0] = BankGetI(Data,0);
               NewtonCollision* ncCompound[iCount[0]];

and then i fill it in a for loop going through all Wrapper class Objects
Code: Select all
               for(int i = 1;i<iCount[0];i++) {
                  BlitzNewtonCollision* tBNC = CASTTO(BlitzNewtonCollision*,BankGetI(Data,4*i));
                  ncCompound[i] = tBNC->Collision();

and then i create the Compound Collision:
Code: Select all
               newtonCollision = NewtonCreateCompoundCollision(blitzWorld->World(), iCount[0], ncCompound, CAST(this));

However, this breaks the whole DLL and makes it crash at any (ASM)RET . It also warns me with this Message:
Code: Select all
E:\Projekte\C++\BlitzNewton\Collision\Collision.cpp|91|warning: 'saved_stack.19' may be used uninitialized in this function|

How do i use it correctly?

Edit: Managed to do it, thought it was CreateCompoungCollision being the bug, instead i forgot to use pointers as an array.
Posts: 8
Joined: Sat Jul 10, 2010 7:49 pm

Return to General Discussion

Who is online

Users browsing this forum: Majestic-12 [Bot] and 4 guests