Dynamic Physics Joint Placement

L

lumps17

Guest
Hello, I have been trying to figure out a joint code that allows me to have a joint set on a physics object based on where I initially clicked on the object, and have it be dynamic so I can drag it around with the mouse but still keep the center of mass the same. A great example of the type of code I'm trying to do is Little Inferno's grab physics. And I would preferably like the object to always be connected to the mouse until I let go. Thanks for any responses.
 

Jezla

Member
It would probably be easier to set the phy_position_x and _y values in relation to the mouse_x and _y values while the mouse button is held down. Using a joint would mean you'd have to have a cursor object that is physics enabled.
 
Top