drawing a string (jit.phys.multiple to jit.path_to_jit.gl.path)
Hi all,
I believe I'm close to it (maybe not) but not quite there.
I want to use jit.gl.path to draw a string
that would be traced by jit.phys.multiple @constraint point2point
using the @constraint_matrix 1
I've tried to make my patch super clear using colors.
I want the green section to talk to the blue section.
Any help would be greatly , greatly appreciated.
thanks a million
you simply need to send the position matrix out of phys.multiple to the input of jit.gl.path
Man that 's great! thanks Rob!! I knew I was just an inch away from the answer.
I'm gonna post my patch hoping it can help other users in the future.
I think that a similar patch to this one could be a good one to include in the Max/examples/Jitter-examples/render/physics/ folder.
using jit.gl.path.
Important topics covered in this patch
- Jit.phys.hinge as an anchor point for rigid bodies
- *** the very important @body1 name_0_0
- hiding specific jit.gl.gridshape bodies using jit.matrix and [pack setcell 0 0 val f f f f] message
-and of course , using the constraint_matrix (from jit.phys.multiple) to draw a line with jit.gl.path.
Notes:
Jit.phys.hinge as an anchor point
- jit.phys.hinge crashed my patch quite a lot when I sent it a "reset" message
-In the end , I got it to work but I really had a hard time creating 2 separate hinges as
an anchor points. (I discovered a 2nd hinge won't appear unless there isn't a @body1 included)
Thanks again Rob
attached is the patch and a jit.matrix saved file that hides the 2nd & 3rd sphere
Hi Phiol,
Just a comment : in your patch, this is not the constraint_matrix which is used to draw line but the position_matrix of the rigid bodies from jit.phys.multiple. So you don't need to set the constraint_matrix attribute to 1.
constraint_matrix is sent from the right output of jit.phys.multiple (dumpout).
Have you seen this topic : https://cycling74.com/forums/jit-phys-vs-pmpd-vs-msd/ ?
Regards,
Pry
Thanks a lot pry ;-)
That post is 3 months old. Been doing quite a lot of patching
since. It(my approach) naturally became what you mentioned.
Side note: One of my favorite use of the @constraint_matrix 1, is to
create blankets using jit.gl.nurbs. with anchor points using phys.hinge.
Or no gravity at all and create a sorta origami of a png.
I'm sure you get what I mean :-)
Still, thanks for the heads up though..
phiol