You'll forgive me if I am beating a dead horse, but I've not been able to find an answer to my question on the forums (if it exists, I'd be quite satisfied with a link! ).
I'm very new to XNA, as well as Bepu, but I've been programming for sometime (not so long with C#, but it's coming fairly fast). My question is probably very basic, but the answer eludes me.
I'm trying to create an island that floats in the sky, and I'm trying to use the StaticTriangleGroup to create mesh collisions with objects thrown at it. I've taken a look at the available demo source code, but the Fish in a Barrel demo is using an older version of the StaticTriangleGroup class.
My code is as follows:
Code: Select all
StaticTriangleGroup group = new StaticTriangleGroup(1.0f, 1, 0, 0, .4f, 0);
Model skyland = Game.Content.Load<Model>("Models/island");
Box detector = new Box(Vector3.Zero, 1.5f, 1.5f, 1.5f);
detector.isDetector = true;
detector.tag = "noDisplayObject";
group.initializeData(skyland);
space.add(group);
entityRenderer.displayModels.Add(new DisplayModel(skyland, detector));
Are there updated samples, or possibly tutorials online that I can browse? I've skimmed the XML, but it didn't help me much at my current skill level with Bepu. I'd be very appreciative for a quick sample.
Thanks!
**Edit: I've managed to get the box to not pass through the island, but it seems to be colliding with a box instead of the model's mesh. Is this a potential problem with the model itself, or am I still doing something wrong?