Forums > Jitter

Jit.phys and target

September 27, 2013 | 11:46 am

Hello.
Still learning jitter, I am looking for a way to make an array of sticks look at a moving point.
I found an interesting patch (from Rob Ramirez) that I tried to mix with the 6dof.spring example
A pictslider is moving an attractor point on x/y dimensions and the jit.phys.object should point at it. The problem is that my object barely follows the point. Its z axis is not aligned and it is always shaking:
<code>

– Pasted Max Patch, click to expand. –

</code>

thank you for your help


October 1, 2013 | 2:12 pm

the technique you are showing is not really useful for dynamic rigid-bodies.
if you set the transform of a rigid-body (position and rotation attributes), at some regular interval, than the rigid-body should be kinematic, not dynamic (@kinematic 1).

kinematic rigid-bodies should only be attached to constraints if there is a dynamic rigid-body also attached to the same constraint.

if you want to adjust the speed of your follow, change the last argument to the rotateto message of anim.drive (a seconds value).

if you want the body oriented so that it always rotates around the world Y axis (as if it was mounted on a tripod) enable @tripod on the jit.anim.node.

<code>

– Pasted Max Patch, click to expand. –

</code>


October 1, 2013 | 3:40 pm

Ok I get it.
As there is no force involved and no collision, the stick is not dynamic.
So do I still need to use a phys.object in this case?
I could also use a simple gridshape in place ?

<code>

– Pasted Max Patch, click to expand. –

</code>

just to go on with maybe silly questions:

let’s say, I want to dynamicaly attract or repulse the z axis of the stick, can I still use 6dof constraint, and a jit.phys.ghost objet as an attractor/repeller?
could I use something like a central_impulse message to orient the stick when the ghost collides with its end.

<code>

– Pasted Max Patch, click to expand. –

</code>

thanks again!


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