(25-08-2023, 03:34 PM)Adammm Wrote: Hey! I have my objects which is moved by script and there are multiple objects moved randomly.
[...] I tried to make multiple obi solvers for each objects but they don't behave the same way as if I add multiple childes under 1 obi solvers.
Thanks!
Hi!
Simulation
takes place in the solver's local space. Which means that if you move the solvers, all actors inside it will move as if parented to it (because they're in fact, parented!).
You should usually not move the solvers, unless you want an inertial reference frame. Just move the actors (softbodies), by applying forces to them - if you want them to follow physics - or teleporting them otherwise. Moving the solver will just rigidly transform all objects inside it, just like in any parent-child relationship.
(25-08-2023, 03:34 PM)Adammm Wrote: I made my softbody and worked just fine with 1 object, but I realized I cannot move the child with the arrows (Tested with arrows in the scene view while playing).
Not sure what you mean by "move the child with the arrows". Do you mean the keyboard's arrow keys or the translation gizmo in the scene view? what does that have to do with using 1 solver or multiple ones?
I get the feeling that you're attempting to translate/rotate individual softbodies by translating/rotating their solver, that doesn't really make sense. What you want is to move the softbodies instead. However you can't move an actor by setting its transform values at runtime, for a very simple reason: transforms only work for rigid objects that have a single, well defined position/rotation/size. Actors in Obi are made out of multiple particles that can move independently from each other so they don't have a single position/rotation value.
In addition to that, using transforms to move physically simulated objects will yield completely incorrect results since transforms are purely kinematic (they have no momentum and will ignore forces/velocities/inertia). This applies to regular rigidbodies as well, that's why
MovePosition and
MoveRotation exist.
You can use actor.AddForce() or actor.Teleport() (equivalent to a rigidbody's MovePosition/Rotation) to move softbodies at runtime. Optionally you can also access all of its individual particle's properties (such as positions/rotations) using the
particles API.
(25-08-2023, 03:34 PM)Adammm Wrote: How can I make multiple obi solvers and make them behave/collide the same way as if there would be one obi solver and childs under it?
Not sure what you mean, actors will behave and collide exactly the same way regardless of how many child actors there are in a solver.