08-02-2021, 08:52 AM
(This post was last modified: 08-02-2021, 08:54 AM by josemendez.)
Hi there!
Particle Attachment is a core class in Obi, and has its own manual page:
http://obi.virtualmethodstudio.com/tutor...ments.html
The picker/dragger and the stitcher are just utility classes, which for the time being aren't documented anywhere (none of the sample scripts are). However they're very simple to use:
ObiParticlePicker iterates over all particles in a solver when you click on the screen, and "picks" the closest one to the mouse cursor. It will fire picked/held/drag/releaseĀ events that you can subscribe to in order to perform custom logic.
ObiParticleDragger subscribes to the picker's events, and implements a simple spring to drag the picked particle around.
ObiStitcher lets you specify two actors, and create "stitches" between their particles. Stitched particles will be constrained to each other, so in a sense the stitcher works like an attachment between particles.
They're all implemented using Obi's particle API, that lets you get/set any particle property (positions, velocities, masses, etc):
http://obi.virtualmethodstudio.com/tutor...icles.html
Particle Attachment is a core class in Obi, and has its own manual page:
http://obi.virtualmethodstudio.com/tutor...ments.html
The picker/dragger and the stitcher are just utility classes, which for the time being aren't documented anywhere (none of the sample scripts are). However they're very simple to use:
ObiParticlePicker iterates over all particles in a solver when you click on the screen, and "picks" the closest one to the mouse cursor. It will fire picked/held/drag/releaseĀ events that you can subscribe to in order to perform custom logic.
ObiParticleDragger subscribes to the picker's events, and implements a simple spring to drag the picked particle around.
ObiStitcher lets you specify two actors, and create "stitches" between their particles. Stitched particles will be constrained to each other, so in a sense the stitcher works like an attachment between particles.
They're all implemented using Obi's particle API, that lets you get/set any particle property (positions, velocities, masses, etc):
http://obi.virtualmethodstudio.com/tutor...icles.html