Forums > MaxMSP

jit.gl.gridshape movement


Joe
June 21, 2013 | 4:32 am

Hi

Anybody know how to change the size of a jit.gl.gridshape ? I am sure the answer is right under my nose, but I am having one of those days I think.

Also, I am able to monitor the velocity of the shape, however is it possible to set this velocity rather than monitor it?

J



Joe
June 21, 2013 | 6:32 am

To add to this, I have managed to get the y coordinates from my cv.jit.grab which I aim to control the jitter jit.phys.body. However, similarly with the previous problem I am having difficulty finding a method of doing this.

I have the y coordinates in a yplace $1 message but how can I use this to control the jit.phys.body ?



Joe
June 21, 2013 | 11:21 am

Just an update, I have attached two attrui’s to a jit.phys.6dof and they move the object which is a great. However I can not understand what the values are making the object do. Changing of numbers does not seem to fit the movements of the object. Does anyone at all have any idea how to control an object simply up and down?

J


June 21, 2013 | 11:25 am

please post a patch, with some comments indicating what you are having trouble with.


June 21, 2013 | 11:45 am

Definitely post a patch, that will help.

Regarding jit.gl.gridshape resizing, most (all?) GL objects will respond to "scale f f f" to resize, "position f f f" to translate/move, and "rotatexyz f f f" to rotate in the three axes. "f" are floats. There’s also "rotate f f f f" which uses quaternions to do the rotation and is harder to wrap your brain around in some ways, but has some nice advantages over rotatexyz.



Joe
June 21, 2013 | 12:12 pm

Okay, will have a go at implementing what you recommend

Here is the current patch with comments

Attachments:
  1. Movement.maxpat


Joe
June 22, 2013 | 6:04 am

Hi

thanks for the heads up about the scale and position etc, these have now been implemented. However if I want to control the position of the object (up/down only) what is the correct method of doing so? Do I just bang a number into the message containing position f f f? Or will this method not work as I already have floats in the position method.

I will post what an example of what I mean if it helps

j

Attachments:
  1. control.maxpat

June 23, 2013 | 9:55 pm

Try this:

(copy and choose "New from Clipboard" in Max):

<code>

– Pasted Max Patch, click to expand. –

</code>



Joe
June 24, 2013 | 5:20 am

Okay I have tried implementing into the patch but all it does it is not controlling the object. The object is just spazzing about in the top left corner.

I will attach the file so you can see.

One positive thing to note that it is staying in its x-coordinates, just need to get some accurate control over the objects y-coordinates

When I start the webcam interface tracking of the left blob, it sends the red object all over the place.

– Pasted Max Patch, click to expand. –

J



Joe
June 24, 2013 | 9:29 am

Also, you stated in the patch that @collisions is not a valid attribute to jit.phys.body as it does not appear in the drop down box. I think you are mistaken here as it is second on the drop down menu.

All the best,

J



Joe
June 25, 2013 | 6:05 am

Sorted now! The problem was I had not scaled the y-coordinates to the worldbox… School boy error

Cheers anyway


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