1
Vote

[PhysicsExplodeBehavior issue]

description

Steps needed to reproduce the issue :
 
1 Create a project that uses "Physics Helper"
 
2 Add a PhysicsControllerBehavior to the Canvas Layout
 
3 Add 2 rectangles with PhysicsObjectBehavior
 
4 Add PhysicsExplodeBehavior to "rectangle1"
 
5 Add trigger to the PhysicsExplodeBehavior : When "rectangle1" intersects with "rectangle2" then explode.
 
6 Keep the default settings of the PhysicsExplodeBehavior.
 
 
Result:
 
When we run the silverlight application we get the folowing error :
 
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Message: Unhandled Error in Silverlight Application Attempted to divide by zero. at Spritehand.PhysicsBehaviors.PhysicsExplodeBehavior.Invoke(Object args)
at System.Windows.Interactivity.TriggerAction.CallInvoke(Object parameter)
at System.Windows.Interactivity.TriggerBase.InvokeActions(Object parameter)
at Spritehand.PhysicsBehaviors.PhysicsCollisionTrigger.controller_Collision(String sprite1, String sprite2)
at Spritehand.FarseerHelper.PhysicsControllerMain.CollisionHandler.Invoke(String sprite1, String sprite2)
at Spritehand.FarseerHelper.PhysicsControllerMain.polygon_Collision(String sourceSprite, String collisionSprite)
at Spritehand.FarseerHelper.PhysicsSprite.HandleCollision(Geom g1, Geom g2, ContactList contactList)
at FarseerGames.FarseerPhysics.Dynamics.Arbiter.Collide()
at FarseerGames.FarseerPhysics.PhysicsSimulator.DoNarrowPhaseCollision()
at FarseerGames.FarseerPhysics.PhysicsSimulator.Update(Single dt, Single dtReal)
at FarseerGames.FarseerPhysics.PhysicsSimulator.Update(Single dt)
at Spritehand.FarseerHelper.PhysicsControllerMain.Update()
at Spritehand.FarseerHelper.PhysicsControllerMain.CompositionTarget_Rendering(Object sender, EventArgs e)
at System.Windows.Media.CompositionTarget.OnRendering(Object sender, RenderingEventArgs e)
at MS.Internal.JoltHelper.RaiseEvent(IntPtr target, UInt32 eventId, IntPtr coreEventArgs, UInt32 eventArgsTypeIndex)
Line: 1
Char: 1
Code: 0
URI: http://localhost:2084/TestPage.html
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

file attachments

comments