- 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.