Predicting Bullet physics

The title says all…
How can I predict first hit after adding force/Resetting velocity?

Couldn’t find it here. You would probably have to use haxe to code this yourself, wasm if it’s too computationally expensive. You could also build for C++ and utilize the plethora of C++ libraries that are available on the internet.

How can you code in c++? Did I think armory3d only supports Haxe, wasm (whats this?) and nodes?

If you build for C++, you can utilize something called “cpp externs” (see @lubos 's git account). You can also call C++ in haxe like so:

untyped __cpp__('printf("A somewhat chaotic and headache inducing method");');

ok… so I found out that scripting the code is a little bit hard…
there’s this “Get First contact” node, is this what does the trick?

A physics object has an array of objects it touches at one frame. This node outputs the first entry in this array (I think)

The question is computing any bounces and correlated times at which they would happen. The nodes are pretty luscious, but it might be an over-complication to try and link together 100+ logic nodes and then debug them. It would be pretty amazing, though. :grinning:

If we can help you with the scripting, it might be best to invest your time there, as scripting basically has a guaranteed success as long as you keep at it.

Maybe you could just run a very fast simulation in another layer and save that to an animation or some other format json/xml string, excessive blender tree, etc. If it comes to speed, though, you might need to figure out multiprocessing for haxe or wasm.

you mean like if I duplicate my scene and shoot the stone there and quickly switch back to my main scene,
then wait for the stone to hit something, it will work?
I don’t think so, because I think Armory stops a scene, then switches to another.
and if I prerender then I need to have some sort of ram eating game.
the thing is I want it in real-time and fast!