I am trying to set up a swing with userdragable objects. After creating the world in JS physics, mouse interaction is added
world.add( Physics.behavior('interactive', { el: renderer.el }) );
which works great. Subsequently, I want some added objects to be dragged (box objects). But the lever cannot be dragged, but it must interact with the boxes. Therefore, the lever must rotate in accordance with the replaced box. Fulcourm is placed in a non-interactive way, setting its property treatmentto static:
world.add( Physics.body('convex-polygon', {
name: 'fulcrum',
x: 250,
y: 490,
treatment: 'static',
restitution: 0.0,
vertices: [
{x: 0, y: 0},
{x: 30, y: -40},
{x: 60, y: 0},
]
}) );
How can objects interact with each other, but only some of them are userdragable?
The violin is available at: http://jsfiddle.net/YM8K8/