Yes I think that is perfectly possible. However, the collision
response is based on the motion integration method, or the body
simulation, so you would be pretty much confined to computing the same
body motion as would be computed by Jinngine. If not, the collision
response computed will be wrong/inaccurate.
The part of jinngine that does this computation is really simple, and
you could easily do it in your own code. I did a little comment in the
code to help:
Alternatively, you could just copy the transforms that are to be
handled by Jinngine, like a controller for each such body. But I guess
you have a good reason for not doing that.
Can you tell me more about your project? Maybe I can be of more help :)
I figure it should be easy to add if it is not there yet, but I will like to
broadcast those events over the flv stream as well as the positional and
orientational data.
Andy
Actually this talk got me thinking, and right now i'm working on some
changes that would make this sort of thing as painless as possible. I
will commit those change as fast as I can. Until now, I would
recommend the following way:
- for each box, create both a body and a box:
Body newbox = new Body( "newbox", new Box(1,1,1));
newbox.setPosition( pos);
newbox.setFixed(true);
scene.addBody(newbox);
- then for deletion, just do
scene.removeBody(newbox);
This will require one body pr box, which is kind of a waste, but it
will not affect the performance much. It spares you from working with
the geometries directly in a single body, because its a bit of a mess
as it is right now. I'm working on fixing that right now.
> Seems to be a whole lot of Vector3 and Matrix creation. Ever thought
> about adding in additional methods to the math classes to either do
> local operations or take a store paramter so it's possible to reuse
> objects from outside? (See our Ardor3D math lib for example).
Yes, this is an issue. There are some methods that starts with
"assign..." that works locally on the same instance. There are also
static instances that work directly on a specified instance. In the
beginning, i never really noticed the flood of objects, until one
day... :) It should definitely be fixed. I think I should start by
doing some profiling, and cure the most work intensive parts. If you
have any input on this, its very welcome :)