Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Particle Dragger
#2
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
Reply


Messages In This Thread
Particle Dragger - by Wax2020 - 06-02-2021, 02:59 PM
RE: Particle Dragger - by josemendez - 08-02-2021, 08:52 AM
RE: Particle Dragger - by Wax2020 - 09-02-2021, 04:50 AM