Chris S.
12-11-2007 17:01:03
I just want to make a simple model for a vehicle: a box that moves.
The current model I'm trying is a box set on four spheres (aka wheels). The spheres are anchored using hinge joints and there is no contact between the geometries (no collisions). At first, I encapsulated everything in transform geometries created in a separate space from the default a la the walking character on the wiki. But, the geometries act REALLY funny like this. After a collision, the spheres and the box go in strange directions completely out of relation with the joints or the physics rules I set up, and any force applied causes the box to blow away like a leaf in the wind--literally, it spins and floats around an imaginary center; it would make for excellent particle physics. At one point I tweaked it so everything acted almost correctly, with spinning wheels and all, but there was still that ... funniness.
So I threw out the separate space and created everything in the default space. Now everything holds together correctly, but the joints are rigid too. The vehicle rests, but any force applied doesn't produce an action, like there's too much friction. Come to think of it, maybe hinge joints are not quite right, but I figure if I can at least get some motion in the right direction, I can go from there. Zero motion is harder to interpret, so I just don't know what's going wrong.
So, I just want to stick with the box/sphere model, and get it so that I just need to apply a forward force on the body, like pushing a toy car. I can attach code if needed, but I want some insight into this approach first. Does anyone have any help to offer me?
The current model I'm trying is a box set on four spheres (aka wheels). The spheres are anchored using hinge joints and there is no contact between the geometries (no collisions). At first, I encapsulated everything in transform geometries created in a separate space from the default a la the walking character on the wiki. But, the geometries act REALLY funny like this. After a collision, the spheres and the box go in strange directions completely out of relation with the joints or the physics rules I set up, and any force applied causes the box to blow away like a leaf in the wind--literally, it spins and floats around an imaginary center; it would make for excellent particle physics. At one point I tweaked it so everything acted almost correctly, with spinning wheels and all, but there was still that ... funniness.
So I threw out the separate space and created everything in the default space. Now everything holds together correctly, but the joints are rigid too. The vehicle rests, but any force applied doesn't produce an action, like there's too much friction. Come to think of it, maybe hinge joints are not quite right, but I figure if I can at least get some motion in the right direction, I can go from there. Zero motion is harder to interpret, so I just don't know what's going wrong.
So, I just want to stick with the box/sphere model, and get it so that I just need to apply a forward force on the body, like pushing a toy car. I can attach code if needed, but I want some insight into this approach first. Does anyone have any help to offer me?