WP7 PhysicDestroyObjectBehavior gravity stops working

Apr 29, 2011 at 10:42 PM
Edited May 1, 2011 at 1:06 AM

Hi,

I am building a program and when ManipulationCompleted I am Destroying the object.  The issue I have is when the bord is resting and then I click on a object the gravity does not work until

a collision happens.  I have no clue how to fix this.

 

Update:

Maybe this will help someone.

 I found the code to stop it from resting.

foreach (var item in

_physicsController.PhysicsObjects.Keys)

{

 

PhysicsSprite

sprite = _physicsController.PhysicsObjects[item];

 

sprite.BodyObject.SleepingAllowed =

false

;

}

Apr 30, 2011 at 7:55 PM

I also find that when you have a user control with PhysicDestroyObjectBehavior and add this in code that the triggers do not work.

 

Anyone find out how to add a pre built user control and get triggers to work?