Replies: 1 comment
-
And second question - how property save state? can i save only pose and velocity and on load -> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be more accurate to ask the question - how to most optimally connect - keep the handles in objects and get the position of the object directly from the side of the game engine, or make a layer that holds a pair of handle-game object and transmits it to the side of the game engine from the side of physics?
As far as I understand, the layer is more optimal, but where and when it is more clever to receive information about poses, because it is most appropriate to transfer a new pose only to those who moved, the only thing I saw was
IntegrateVelocity
(or is there a ready list of moved bodies?) How appropriate is it to transmit directly in this callback? since I don't want to interfere with batching and C# JIT (the transfer simple data can call external functions (C++))I think make a loop and have
List<bodyIndex> movedBodies
and haveList<GameObject>[bodyIndex] bodyGoPairs
i.e ->
foreach (int index in movedBodies)
->bodyGoPairs[index].GlobalPosition = simulation.Bodies.ActiveSet.Poses[index]
And question,
IntegrateVelocity
can call several times per one body in one timestep?Beta Was this translation helpful? Give feedback.
All reactions