Tutorials

Introduction to jit.phys, Part 2

In our second in-depth Jitter Physics tutorial video you will learn how to access the collisions of a physics world to use elsewhere, use forces to move bodies around, connect bodies and control motion with various constraints, and optimize the simulation timing of the physics world.

by Les Stuck on September 21, 2012

Les Stuck's icon

It was pointed out that there is something confusing happening at 1:50.

Because of the multiply object attached to the mass number box, changing the mass of the body changes the force of the ghost, so that the force acts like gravity. However, you never get to see this behavior because clicking the large message box resets the force back to its original value, so that the more massive body moves more slowly in reaction to the same force, which is correct. I probably should have deleted the multiply object before shooting the tutorial.

Franky Redente's icon

Hi Les, this is great thank you. I am having some problems trying to move objects using the leap motion. I would love to interact with a phys.body but somehow the hands do not interact with the body. (please see screen shot).
Please let me know if you know a solution to this, what I am doing wrong. thank you.

Screen-Shot-2015-09-09-at-11.27.08.png
png
vichug's icon

it seems your hand is not part of jit.phys world

Franky Redente's icon

Hi @Vichug, yes they are..
Could it be: The hands are drawn with jit.gl.sketch which render a gl. visualisation of the incoming data from the leap.They are not a phys.body them selves, therefore they cannot collide with anything??

Rob Ramirez's icon

it's impossible for us to tell from a partial screenshot, so post your patch if you want help.
from the screenshot it looks like you don't have a jit.phys.world object in your patch.

Franky Redente's icon

@Rob, sorry about that. please find attached the patch.
The folder includes the leapmotion object too ( http://julesfrancoise.com/leapmotion/ ).

Please let me know if you could help. Thank you

leapworld.zip
zip
Rob Ramirez's icon

as vichug says, your hand is not part of the phys.world.

you need to create phys.bodies for each part of your hand that you want to interact with the phys.world. they should be @kinematic 1, and easiest is probably to simply create phys.body sphere's for each blue sphere of your hand, and update their position with the position you give to each blue sphere.

Franky Redente's icon

Hello Rob, thank you for the reply. Yes I did work that out today.. I tried with one sphere and worked..
A
I did some research on the kinematic attribute too. thanx so much.

Spa's icon

Can you post the final patch?
Thanks

Franky Redente's icon

Hi SPA, yes def I will. I doing a BA project duwe in December, once is done I share it here. Thank you guys. btw Rob tip worked great ..thank you all

Franky Redente's icon

Hello guys, I hope you are well.

Quick update re leap + Oculus:
The patch is working..i am testing as we speak. wanted to report few problems:

To fully render both hands, I ended up creating ’42’ individaual jit.phys objects (pleas tell me i am wrong).
This is creating fps drops.

I believe i should be able to create multiple phys object via the jit.phys.multiple.. but I have no idea how to send the leap positions (x y x for each ) to the the jit.phys.multiple.
I was thinking.. maybe if I use the jit.phys.multiple instead of individual ones should reduce fps drops and errors.

Please advice me on this, I have attached the patch so you can have a look.

Open_this.maxhelp1.zip
zip