Forums > Jitter to control scale and jit.phys.body to control position and rotate

February 28, 2012 | 11:00 pm

Any idea how I use 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.

February 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 and let us know!

March 1, 2012 | 4:32 pm
— Pasted Max Patch, click to expand. —

Is this right? It seems weird.

March 1, 2012 | 5:00 pm

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 and send them where you want. HTH

March 1, 2012 | 7:42 pm

Cheers that seems better.

March 1, 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.

March 1, 2012 | 9:33 pm

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

March 2, 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.

— Pasted Max Patch, click to expand. —
March 2, 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:

— Pasted Max Patch, click to expand. —
March 2, 2012 | 7:28 pm

Cheers, that really helps.

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

Forums > Jitter