Forums > Jitter

Please help with Z and 2D

Jan 01 2013 | 9:43 pm

Hey I just started using jit.phys and I’m stuck at a problem I think can be solved quite simple but I can’t figure it out.

I have a patch and want the world to act in 2D so simply I added remove_plane z to my

The jit.body object moves only on the x and y axis now, but the z axis is still shown in my worldbox and if I scale the z axis the phys.body is stuck.

I attached the patch as copy compressed.
Would be really glad if someone can help me out!

-- Pasted Max Patch, click to expand. --

Jan 02 2013 | 2:21 pm

to remove z plane , you have to write "@remove_plane 3" and not "@remove_plane z" on…


Jan 02 2013 | 6:29 pm

mathieu is correct.

it’s a little confusing when looking at the attrui, because the label of the attribute is displayed rather than the value.
if you look at the attributes list from the wheel menu, you should see something like: remove_plane (3 : z), indicating that it is in fact an integer (as well as the reference page).

if you want to create a 2D view, instead of the default perspective view of gl.render, you can set @ortho 1 on your gl.render, and adjust the size of the view with the gl.render @lens_angle attribute. something like @lens_angle 140 will show the entirety of the default box.

Jan 02 2013 | 8:37 pm

thanks matmat and Rob that helped, I worked with the 2D example but couldn’t recreate it for myself the same way from scratch.. I focused on the and forgot to add the attributes to the gl.render.

Thanks a lot!

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

Forums > Jitter