toglia
09-04-2008 19:47:04
Hi, I know a lot has been spoken about convex shapes in the forum, and although I have read a lot of them I´m still struggling to put my first custom convex shape in the scene.
First thing, I´m using NxOgre 0.9 till I get use to it, then I´ll change to Bleeding, so I can´t use flour for now.
Well, what I need to do is a convex shape, somehow, it really doesn't matter, could be by code, with the .mesh file, or anything else, and this is what I have tried.
From:
http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=5766
I tried to represent a cube with verts:
std::vector<Vector3> verts;
verts.push_back(Vector3( 1, 1, 1));
verts.push_back(Vector3( 1, 1,-1));
... //6 more verts
but the CovexShape class has no vector overload, so I got stuck there.
Another thing I did was:
And this works! but after I try my own exported 1m cube it crashes on:
malloc.c
res = _heap_alloc(size);
So, I know this problem can be exporter related, but its the only exporter I have found for Maya 2008, and I have tweak it a little but still getting the same error.
Is there something else I can try.
I´ll appreciate any suggetion.
First thing, I´m using NxOgre 0.9 till I get use to it, then I´ll change to Bleeding, so I can´t use flour for now.
Well, what I need to do is a convex shape, somehow, it really doesn't matter, could be by code, with the .mesh file, or anything else, and this is what I have tried.
From:
http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=5766
I tried to represent a cube with verts:
std::vector<Vector3> verts;
verts.push_back(Vector3( 1, 1, 1));
verts.push_back(Vector3( 1, 1,-1));
... //6 more verts
new ConvexShape(...)
but the CovexShape class has no vector overload, so I got stuck there.
Another thing I did was:
mScene->createBody("cube.1m.mesh", new ConvexShape("cube.1m.mesh"),Vector3(0,10,0));
And this works! but after I try my own exported 1m cube it crashes on:
malloc.c
res = _heap_alloc(size);
So, I know this problem can be exporter related, but its the only exporter I have found for Maya 2008, and I have tweak it a little but still getting the same error.
Is there something else I can try.
I´ll appreciate any suggetion.