jit.anim.drive to control scale and jit.phys.body to control position and rotate


    Feb 28 2012 | 11:00 pm
    Any idea how I use jit.anim.drive to control the scale (I want to make something pulsate) and jit.phys.body to control the position on rotation of a gridshape?
    My efforts crash jitter.

    • Feb 28 2012 | 11:25 pm
      Post a patch, so we can better see exactly what you are trying. Also, if you are getting reproducible crashes, please be sure and visit http://cycling74.com/max6-bug-form/ and let us know!
    • Mar 01 2012 | 4:32 pm
      Is this right? It seems weird.
    • Mar 01 2012 | 5:00 pm
      Try this.
      By setting the @targetname , we don't have to connect directly to the controlled object. Then you can filter the messages coming from jit.anim.drive and send them where you want. HTH
    • Mar 01 2012 | 7:42 pm
      Cheers that seems better.
    • Mar 01 2012 | 7:49 pm
      also, if you set @send_scale 1 on your phys.body, you only need to send the scale values to the phys.body, and they will propagate to the gl.gridshape.
    • Mar 01 2012 | 9:33 pm
      Cheers yeah, I unset it because having the gridshape receive scale from both phys and anim understandably made jitter angry.
    • Mar 02 2012 | 1:04 am
      Something's still not right, I can use jit.anim to make both the phys and the gridshapes change their scales but when I try to move the phys object with an impulse message it moves for a tiny bit then stops.
    • Mar 02 2012 | 6:39 pm
      simple rigid-body shapes don't like to be scaled. the engine basically recreates the collision shape everytime you adjust the scale. thus the forces are not working.
      however, convex-hull shapes don't have this problem. so you can achieve this effect by doing the following:
    • Mar 02 2012 | 7:28 pm
      Cheers, that really helps.