Multiple Contact points

Feb 11, 2009 at 9:04 AM
Hi!
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 ?

thanks,
Tiago
Coordinator
Feb 11, 2009 at 11:46 AM
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 1:12 PM
Hi!
I found the problem. The UserControl main canvas was missing the x:Name="LayoutRoot".

Thanks!
Tiago