Havok - get/set the position

How can I set the position?

On my machine, I can’t pass very many objects to the Physics Engine. The CPU falls to its knees under the load and the animation becomes slow.

I had the idea of using the physics engine in places where the objects are more visible and should be animated more often.

So I just have a set of agg.bodies that get their position and linear acceleration in the interval, work with it for a while and return the position and acceleration.

I am currently failing with the repositioning.

transformNode.position an spheres[i].position don’t give back the current position and getAbsolutePosition is not correct.

The idea to hang the mesh with parent = sphere[i] is not a good idea, too.

Can someone give me a hand?

Experiment : relative use of physics | Babylon.js Playground (babylonjs-playground.com)

I am not sure what is supposed to happen exactly but check this out: https://www.babylonjs-playground.com/#C8I4X9#1

disable disablePrestep on the physics body right before you want to change a transform on the transformNode. If it is a one time assignment, enable it again in the next frame or so (performance).

did not see any problems.
collisions are in equal time.
if you want to predict, use quadratic formula.

almost right now.

Experiment : relative use of physics | Babylon.js Playground (babylonjs-playground.com)

but whether the idea is really useful is another matter … :confused: