Obscene oscillation with... WeldJoint?
Posted: Fri Apr 27, 2012 4:49 am
So, the title kinda says it all. I set up a few entities (which all use collision data generated from the same model), attach a WeldJoint to each of them, hook an event to make them obliterate any boxes that touch them, and let them run free. There are six of these in total, and all of them but the first have this obscene oscillation to them. The first one is even in the same machine with another, but the first is the only one totally unaffected by this. I use the same two BaseModel declarations to initalize all six (just ditching the old reference when I've added it to a machine), but that shouldn't be an issue (and if it was, the the second one would work fine, too). Do you have any idea what's going on? The WeldJoint initialization is just like the other ones I've made, which is:
If I don't add the WeldJoints, the models just fall forever cause of gravity, so it's WeldJoint based. If I hook entity.CollisionInformation.Events.InitialCollisionDetected with a method that removes boxes from the space, do I even need them to withstand collision? Actually, what's even better would be being able to hook an event that denotes collision, but not actually collide with anything (these are lasers, and that's usually what lasers do), preferrably without using CollisionGroups, because that would be require a couple more collision groups and rules, which I'd like to avoid. Thanks for your help!
Code: Select all
foreach(BaseModel m in models)
{
WeldJoint j = new WeldJoint(null, m.Entity);
j.IsActive = true;
joints.Add(j);
}