Multiple Contact points

Feb 11, 2009 at 10:04 AM
I noticed that in the doll demo we are able to pick and move several parts of the body.
I tried to create a new control - a bone, with one rectangle and 2 circles - and created 2 physics joints. But with the bone I am only able to have one point of control in the middle and not on where the physics joints exists !?

How can I create the multiple picking points ?

Feb 11, 2009 at 12:46 PM
It should "just work" as long as MousePickEnabled is true on the PhysicsController, so something odd must be going on.

Are you sure the circles are actually being translated into Physics bodies? (are they colliding properly?) If not, I would check that they have an x:Name and an explicit Height and Width assigned.

Also, you can try setting a breakpoint in PhysicsController.AddPhysicsBody, where it wires up the mouse handlers:
    if (MousePickEnabled)...

And also try setting a breakpoint in PhysicsController in the polygon_MouseLeftButtonDown event handler.

Hope this helps!
Feb 11, 2009 at 2:12 PM
I found the problem. The UserControl main canvas was missing the x:Name="LayoutRoot".