jit.anim.drive to control scale and jit.phys.body to control position and rotate
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.
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 https://cycling74.com/max6-bug-form/ and let us know!
Is this right? It seems weird.
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
Cheers that seems better.
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.
Cheers yeah, I unset it because having the gridshape receive scale from both phys and anim understandably made jitter angry.
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.
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:
Cheers, that really helps.