(22-07-2024, 10:26 AM)Fuzzypeg Wrote: Is there an equivalent for this in the current version? All of the documentation I can find is out of date and obi handles aren't a thing anymore
This is the documentation for the latest version:
http://obi.virtualmethodstudio.com/manual/6.3/
Handles were replaced by static attachments in Obi 4.0. Functionally they do the exact same thing.
(22-07-2024, 10:26 AM)Fuzzypeg Wrote: nor is the option to set individual particle positions manually.
Disable the attachment, set the particle positions, then re-enable it. There's sample code for this in the manual, that forces particles to attach to a specific local position in the target transform:
http://obi.virtualmethodstudio.com/manua...ments.html
(22-07-2024, 10:26 AM)Fuzzypeg Wrote: I have a rope that is being grabbed at one end so I want the loose end to respond to physics, but the grabbed end to stay attached to the hand which is moved in update. Currently, if I use the fixed updater, the grabbed end is floaty and disconnects from the hand, but if I use late updater it jitters.
This doesn't have anything to do with the attachment itself, but with the order in which Unity calls its events. By default Obi's physics engine (and attachments, since they're part of the engine) are updated in FixedUpdate(). If you update the hand in Update (
which takes place after FixedUpdate) there will be a one frame delay between the hand and the rope, since the simulation works with transform data that is one frame old. If you use LateUpdate, it will jitter since it uses a variable timestep instead of a fixed timestep (which is what FixedUpdate is for in Unity).
Maybe you want to update the hand's transform in
ObiSolver.OnBeginStep instead, so that it takes place before each physics update? This would solve both of the above issues.
(22-07-2024, 10:26 AM)Fuzzypeg Wrote: I want it to not simulate physics on the grabbed particle while still doing so on the rest of the particles
Physics are not simulated for particles handled by a static attachment. Their mass is set to infinite and their position follows the target transform. All other particles have their physical simulation updated as usual.
(22-07-2024, 10:26 AM)Fuzzypeg Wrote: and I need this to be dynamic because the rope could be grabbed from either end or not at all.
You can create/destroy attachments at runtime just fine, see:
http://obi.virtualmethodstudio.com/manua...ments.html
let me know if I can be of further help,
kind regards