I recently discovered the world of panda3D and for now i’m very surprising about the great things this engine can do.
At the moment i been playing around with ODE for a while, but due to the fact that: “i’m a noob”, I got a issue with body collision.
Here’s the file to download: http://www.mediafire.com/?w2uadc6rc5y3nk6
In this little script i’ve got a floor (ODEplane), a bowling ball (ODEsphere) and two pins (one ODEcylinder for each). The ball collide with the floor, the pins collide with the floor, the ball collide with any of the two pins. The problem is: the pins don’t collide between them.
can anyone look at the code an give me a hint detecting the problem?
Thanks and sorry about my English!! is really bad, i know.
I haven’t downloaded your code, but if the only problem you have is the lack of collisions between Cylinder Geoms, then I know where the problem is. And I have two messages for you. The good one is, you’ve done nothing wrong. The bad one – ODE doesn’t support collisions between Cylinders… Not only in Panda, in general.
Look here for more information: opende.sourceforge.net/wiki/inde … _Detection
You should be able to work around this problem pretty easily, though. Just use a combined shape. Use a capsule for the actual pin, and attach a little cylinder to the bottom of that capsule, so you can get a flat surface there, which will allow you to stand that pin upwards on the floor. Additionally, this is a much better approximation of the pin’s shape, I think.
I haven’t tried doing this, so I can’t guarantee it’ll work, but it should.
Understandable, so good enough .
ooohh, it’s a ODE problem! thank’s very very much coppertop. Your idea of the capsule and the little cilinder is great, except for one thing, i don’t know how to make a combined ODE shape (attach two ODEgeoms or ODEbodys togheter) . Can you explain a little about attaching? (or send me a link to a topic, manual, etc).
Soo… that’s all… thanks again for the answer coppertop!!!
ode.org/ode-latest-userguide.html#sec_10_9_0 – This should give you a starting point. Unfortunately, while I’ve done many things with ODE, I haven’t actually tried making composite objects yet.
But, as far as I know, it’s not that complex. At least in this situation. Create a single OdeBody with Cylinder-type mass and attach both Geoms (Capsule and Cylinder) to that body, and it should work, hopefully .
Let me know if it works, and make sure to read that ODE manual section I linked to – it will help you avoid instability with composite objects.
Coppertop, I follow your idea of the capsule and the little cylinder at the base of the pin and works great!!!. The Ode combined geometry thing was really easy, only two different ODE geom with the same body, that’s all. Here’s a reference of how the Ode geometries was placed.
The ODE capsule geom doesn’t work very well when collide on the “capped” part, so it’s not a bad idea to put cylinders over the two capped sides of the capsule to make an approximation of a cylinder that can collide with other cylinders. The ODE composite Geometry was really usefully for me to make really complex figures from few simples ones, and after now I think I’m gonna use it a lot.
Here’s the bowling sample: http://www.mediafire.com/?9eqekl39l0d6s52, it includes two main files, one with the models and other only with the ODE visible geometries to see how they are combined and how react. The sample consist of one bowling ball, ten pins and a trimesh as the bowling court. The ball init with a random linear and angular velocity, but if you press space the ball position, angular and linear velocity resets.
Thanks again coppertop, you help me a lot!
Hey, that’s really neat!! Glad I could help .
On a side note, I advice to limit the use of trimeshes. I found them to be rather unstable sometimes. For example, a sphere with lots of torque can just sink into a trimesh in certain situations.
Also, note that ODE doesn’t support rolling friction.