Forums > Jitter

how to simulate a floating object?

September 30, 2013 | 10:30 am

I just discovered the @shape dynamicmesh example patch, and thought it would be the best tool to simulate a buoy floating on a water surface.
Can I make a jit.phys.body object directly interact with this surface? ( it involves to allow overlapping between the dynamic mesh and the buoy)
If it is not the right solution, Should I evaluate the normal vector at a given point of the surface to make my objet follow its movements?
I saw that jit.anim.node had a direction attribute but I don’t know how to get it from a precise point of the dynamic mesh…


October 1, 2013 | 1:16 pm

i would us phys.ghost for this:

<code>

– Pasted Max Patch, click to expand. –

</code>


October 1, 2013 | 2:31 pm

thank you for pointing me the phys.ghost objet. I definitely have to study it
Actually, my floating object was a shortcut for finding the normal vector at a given point of the water surface. The normal orientation will trigger some sound events and variations.
the floating objects with the ghost solution will only fluctuate on their y axis. and jit.bfg is perfect for water surface simulation.
Here is what I tried to achieve. Is there a way to get and draw the normal vector? I may not have to use a "buoy" for that.
I have read I can get the normal matrix thanks to @matrixoutput from a gridshape, is it a solution to study?

<code>

– Pasted Max Patch, click to expand. –

</code>


Viewing 3 posts - 1 through 3 (of 3 total)