Jit.phys and target

    Sep 27 2013 | 6:46 pm
    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:
    thank you for your help

    • Oct 01 2013 | 9: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.
    • Oct 01 2013 | 10: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 ?
      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.
      thanks again!