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

Feb 28, 2012 at 11:00pm

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.

#62041
Feb 28, 2012 at 11:25pm

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!

#224097
Mar 1, 2012 at 4:32pm
– Pasted Max Patch, click to expand. –

Is this right? It seems weird.

#224098
Mar 1, 2012 at 5:00pm

Try this.

– Pasted Max Patch, click to expand. –

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

#224099
Mar 1, 2012 at 7:42pm

Cheers that seems better.

#224100
Mar 1, 2012 at 7:49pm

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.

#224101
Mar 1, 2012 at 9:33pm

Cheers yeah, I unset it because having the gridshape receive scale from both phys and anim understandably made jitter angry.

#224102
Mar 2, 2012 at 1:04am

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.

– Pasted Max Patch, click to expand. –
#224103
Mar 2, 2012 at 6:39pm

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:

– Pasted Max Patch, click to expand. –
#224104
Mar 2, 2012 at 7:28pm

Cheers, that really helps.

#224105

You must be logged in to reply to this topic.