Question regarding PhysicsExploreBehavior and Windows Phone 7

Jan 28, 2011 at 8:06 AM


I'm using the latest build of Physics Helper on Windows Phone 7. When a PhysicsCollisionTrigger is activated, the explosion does not happen on the designated sprite (the sprite that contains the PhysicsExplodeBehavior) but on the (0,0) point on the canvas. Any hint would be much appreciated.

Kind regards,


Jan 28, 2011 at 1:13 PM

I think that when I updated the Physics Helper from Farseer 2 to Farseer 3 (a big change which affected the coordinate system), a couple of the behaviors including Explosion and Camera did not get updated. So they are using the old coordinate system to determine position.

Sorry I haven't had time to update those, but if you look at the Behaviors I'm pretty sure you just need to update to the PhysicsSprite.Position instead of the Body Position.

Jan 28, 2011 at 1:50 PM

Oh, no need to apologise, thanks a *lot* for the hard work you've done!

Question: I've updated the explosion and it works like a charm...

I can't get the camera to work, though :(

I've modified these two lines

currentTargetXOffset = Convert.ToInt32(_targetElement.Position.X); 
currentTargetYOffset = Convert.ToInt32(_targetElement.Position.Y);
(lines 269-270 of CameraControllerMain.cs)
but it does not seem to work... Am I missing something?


Jan 28, 2011 at 2:04 PM

Forget it, camera also works perfectly! It just needed one more rebuild hehe :)

Thanks for everything!