I'm trying to use one aspect of the new multi-geom support. Specifically, I'm trying to add a single Geom to a body where the Geom's center does not coincide with the body's reference point. I started with code like this:

But when I run the sim, the chassis body immediately disappears from view. I haven't tried to track it down, but maybe it's falling through the Trimesh terrain. This is also the behavior when V_CHASSIS_OFFSET is a zero vector (0, 0, 0), which I would expect to behave exactly as if there was no GeomTransform, just like the first code block.

Am I doing something wrong? I believe I'm doing things as the ODE docs say, but maybe I missed something.

Changing the order as you suggested didn't help; same problem. However, I have discovered that my model isn't simply falling through the terrain, but is getting totally dislocated from reality:

1 2

location: (-1.0, 50.0, -1.0)location: (NaN, NaN, NaN)

That's output from my app for each frame. Each line of output is before I call stepFast. The first line indicates my body's location as I set it before I run the sim. The second line shows the body's location after ODE gets done with it. And that's the last line of output. No additional frames are rendered and it seems the whole Java3D render loop is stuck (trying to render an object that is "nowhere"?).

When I revert to my previous code (i.e., no GeomTransform), I get normal output:

As you can see, the sim runs and the body can be seen to fall under gravity's influence until it collides with the terrain at about y=49.3, then it bounces a bit and life goes on.

I can't figure out what's wrong. I'm willing to try to build a test case, but that would be a horrendous task starting from my current code base. In the test you displayed in the other post, did you have gravity?

I've got the NaN (means "Not a Number" FYI) issue before and it's a pain.

Can you run my multi-geom/encapsulated-geom demo? If so, can you try and mimick my code? Try running org.odejava.test.simple.MultiGeomTest (you'll need to run it though a harness - either the Xith3D class RunDemo or your own implementation of RunDemo).

That code works great for me. I have seen your issue before though - I think ODE just needs things in the correct order. It's VERY important to make backups/use version control with this I find, being able to roll back to the last working version is essentiall!

No luck yet. I've run the demo and it works as expected. My code is doing exactly what yours is, in the same order. I'm still scratching my head.

I'll try to reduce my code to the bare minimum while reproducing my problem. I have no idea how long this will take because some real life is intruding on my play time. I'll update when I get something. Thanks.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org