jit.gl.gridshape movement

Jun 21, 2013 at 4:32am

jit.gl.gridshape movement

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

#253530
Jun 21, 2013 at 6:32am

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 ?

#253541
Jun 21, 2013 at 11:21am

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

#253625
Jun 21, 2013 at 11:25am

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

#253626
Jun 21, 2013 at 11:45am

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.

#253634
Jun 21, 2013 at 12:12pm

Okay, will have a go at implementing what you recommend

Here is the current patch with comments

Attachments:
  1. Movement.maxpat
#253642
Jun 22, 2013 at 6:04am

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
#253731
Jun 23, 2013 at 9:55pm

Try this:

(copy and choose “New from Clipboard” in Max):

<code>

– Pasted Max Patch, click to expand. –

</code>

#253817
Jun 24, 2013 at 5:20am

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

#253829
Jun 24, 2013 at 9:29am

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

#253867
Jun 25, 2013 at 6:05am

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

Cheers anyway

#254012

You must be logged in to reply to this topic.