Mirrored Physics

Topics: User Forum
Nov 13, 2006 at 2:24 PM
This project is pretty nice so far, but I have a small problem. Whenever I run my simulation, the physics are a mirror image of what they should be. When I attempt to pass negative values of the Quaternion angles (of my solids) the simulation is run in the right direction, but it's really glitchy (seemingly random rotations). I looked at the sample project and saw that ConvertOdeMatrix(Matrix m) is used, but I cannot find this method anywhere. Any help is appreciated.
Coordinator
Nov 13, 2006 at 4:28 PM
public Matrix ConvertOdeMatrix(Matrix bMat)
{
Matrix t = new Matrix();
t.M11 = bMat.M11;
t.M12 = bMat.M21;
t.M13 = bMat.M31;
t.M14 = 0;
t.M21 = bMat.M12;
t.M22 = bMat.M22;
t.M23 = bMat.M32;
t.M24 = 0;
t.M31 = bMat.M13;
t.M32 = bMat.M23;
t.M33 = bMat.M33;
t.M34 = 0;

t.Translation = bMat.Translation;

return t;
}

you should also note that t.M44 is somewhere corrupted and you need to set it to 1
Coordinator
Nov 13, 2006 at 4:30 PM
that's all about native ODE bugs which are hard to debug, in future there will be Bullet implementation in C# so that bugs will be fixed very simple...
Nov 13, 2006 at 5:16 PM
Cool. I did notice that M44 was being set to 1 in the demo, but after trying that it made it crazy to the max (probably because I didn't have ConvertOdeMatrix()). I'm at school right now, but I'll try it with the conversion function when I get home.
Nov 13, 2006 at 10:50 PM
Alright! Worked perfectly. If I don't set M44 to 1, it goes all crazy, so I just put it in the conversion method. I was also wondering if anyone has found a reliable way to read the vertex information from a mesh. I have tried most of the methods posted on MSDN, but none of them worked correctly.
Coordinator
Nov 14, 2006 at 8:39 AM
there's a bug with mesh collisions too :)
just wait for the Bullet support :)
Nov 14, 2006 at 4:46 PM
Haha, that sucks. I guess I will wait then.