Please help with Z and 2D

Jan 1, 2013 at 9:43pm

Please help with Z and 2D

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 2, 2013 at 2:21pm

to remove z plane , you have to write “@remove_plane 3″ and not “@remove_plane z” on…


Jan 2, 2013 at 6:29pm

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 2, 2013 at 8:37pm

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!


You must be logged in to reply to this topic.