Polygon Problems

Oct 27, 2012 at 9:55 PM

I've been drawing polygons (in Blend) onto the PhysicsSprite, but the BodyObject is not being translated correctly. The body is being offset by the Canvas.Left and Canvas.Top amounts and does not match up with the Path being displayed. I removed the code to "adjust the position for Canvas Left,Top" in BoundaryHelperBox2d.cs and it works great. However, the truck in Demo.Advanced is being displayed just fine with OR without the code being bypassed. Not sure what to make of it really. Just thought I'd pass it along.

Oct 27, 2012 at 10:07 PM
f0rmat wrote:

I've been drawing polygons (in Blend) onto the PhysicsSprite, but the BodyObject is not being translated correctly. The body is being offset by the Canvas.Left and Canvas.Top amounts and does not match up with the Path being displayed. I removed the code to "adjust the position for Canvas Left,Top" in BoundaryHelperBox2d.cs and it works great. However, the truck in Demo.Advanced is being displayed just fine with OR without the code being bypassed. Not sure what to make of it really. Just thought I'd pass it along.

Update - changed the code to the original version and remove the Stretch="Fill" dependency. Now it works just fine. I guess in the Demo.Advanced uctruck.xaml the Stretch="Fill" was minimal, so I couldn't tell the difference at first.