Behaviors configuration

Jun 11, 2010 at 3:48 PM

Hi to all,

I apologies for this discussion but I don't find any behaviors under my blend 3 Behaviors Panel.
I followed the steps (copy the DLLs into relative Silverlight/WPF Library folder) but nothing happened.

What I have to do?

 

 

Thanks a lot.

Coordinator
Jun 11, 2010 at 4:13 PM

If you are using Blend 3 and VS2008, I would recommend that you use the older 3.0.0.3 release http://physicshelper.codeplex.com/releases/view/32879

The newer release targets Blend 4, VS2010, and includes Windows Phone support.

Jun 11, 2010 at 4:15 PM

Thanks.

Jun 11, 2010 at 4:21 PM

... I tried with 3.0.0.3 release but it still doesn't work.

I only see:

  • ChangePropertyAction
  • ControlStoryboardAction
  • FluidMoveBehavior
  • GoToStateAction
  • LaunchUriOrFileAction
  • MouseDragElementBehavior
  • PlaySoundAction
  • RemoveElementAction
Coordinator
Jun 11, 2010 at 4:32 PM

Hmmm... The only other thing I can suggest is to add references to the assemblies manually.

In Blend, right-click the References folder in the Projects Panel and select Add Reference... Then add the following assemblies from the download (these are for Silverlight development. For WPF dev, use the bin subfolder assemblies instead)

Common\PhysicsBehaviors\ClientBin\FarseerPhysics.dll

Common\PhysicsBehaviors\ClientBin\Spritehand.FarseerHelper.dll

Common\PhysicsBehaviors\ClientBin\Spritehand.PhysicsBehaviors.dll

Common\PhysicsBehaviors.Design\ClientBin\Debug\Spritehand.PhysicsBehaviors.Design.dll

 

Jun 11, 2010 at 4:37 PM

It seams to works...

Now I see:

  • PhysiscsApplyForceBehavior
  • PhysiscsApplyRotationBehavior
  • PhysiscsApplyTorqueBehavior
  • PhysiscsCameraBehavior
  • PhysiscsControllerBehavior
  • PhysiscsDestroyObjectBehavior
  • PhysiscsExplodeBehavior
  • PhysiscsFluidContainerBehavior
  • PhysiscsJointBehavior
  • PhysiscsObjectBehavior
  • PhysiscsSoundBehavior

Is it right?

Thanks a lot

Coordinator
Jun 11, 2010 at 4:53 PM

Yep, looks right. If you're new to the helper I would recommend watching the intro videos here - http://physicshelper.codeplex.com/

Jul 27, 2010 at 11:58 AM

Cannot make it work in Blend 4. I'm unable to make this behaviors appear.

Jul 27, 2010 at 11:59 AM

Note that I'm not talking about the beta release!

Coordinator
Jul 27, 2010 at 12:36 PM
If you are targeting Silverlight 3 in Blend 4 then it should work. If you are targeting Silverlight 4 in Blend 4 then you will need the latest download http://physicshelper.codeplex.com/SourceControl/changeset/changes/55578 This is because the behavior assemblies for the Blend SDK changed slightly between Blend3/Blend4 Sorry for the extra install steps, I plan on cleaning this all up with a better installer after WP7 tools are closer to RTW.
Jul 28, 2010 at 8:32 AM
Thank you Andy! It worked! Great job this you are doing here!
Sep 19, 2010 at 12:16 PM
Edited Sep 19, 2010 at 12:17 PM

Hey Andy, I'm still not seeing any behaviors showing up in Blend 4/Silverlight 4 projects using the above 55578 release. It is working for Blend 4/Silverlight 3 however.

Thanks

Oct 12, 2010 at 9:43 PM

Dear Andy,

I downloaded and installed the 55578 patch.

I am trying to use the PhysicsHelper library on Windows Phone 7, but the behaviors still do not work.

I have to develop phone applications with Blend 4/Silverlight 4. Can you tell me when are you going to release a patch?

Thanks.

Coordinator
Oct 12, 2010 at 10:23 PM

If you download and extract the latest code branch, make sure you add references to the assemblies inside \Common\PhysicsBehaviors\ClientBin4\

These should work fine for Silverlight 4.

Sorry for the delay in a new build, I was finishing up a couple of my own games for WP7 and also am working on porting to Farseer Physics 3. Getting closer....

Coordinator
Oct 12, 2010 at 11:16 PM

Oops - I just realized you mentioned WP7 development, no SL4? Anyway there is a PhoneBin directory in the same folder that has the WP7 build.

Oct 13, 2010 at 1:06 PM

Thanks Andy.

I supposed that I had to use the files in the PhoneBin directory, therefore I referenced those files. But I didn't consider the ClientBin4 directory. I'll try it and let you know.

Thanks for your prompt response.

Coordinator
Oct 13, 2010 at 1:24 PM

Just to be clear, if you are doing WP7 dev then you want to use the PhoneBin assemblies.

If you are doing SL4 dev then you want to use the ClienBin4 assemblies.

(as a side note, ClientBin contains SL3 assemblies which work with Blend 3)

Oct 13, 2010 at 4:04 PM

Thanks Andy.

Now it's clear. I have used the PhoneBin assemblies.

I am creating the application following your first video on "the basics". The behavior works well with the platform, but when I associate the behavior to the image the application crashes. The image is a png file. When I run the project with Visual Studio 2010 Express for Windows Phone the error that I get is the following:

IndexOutOfRangeException and the call stack location is the following:

Spritehand.FarseerHelper.dll!Spritehand.FarseerHelper.BoundaryHelper.GetNextVertex(System.Windows.UIElement element, System.Windows.Point current, System.Windows.Point last, double left, double top, double width, double height, System.Windows.Media.Imaging.WriteableBitmap bitmap) + 0xc6 bytes 
  Spritehand.FarseerHelper.dll!Spritehand.FarseerHelper.BoundaryHelper.GetPointsForImage(System.Windows.Controls.Image element, System.Windows.UIElement containerElement, bool positionOnly) + 0x278 bytes 
  Spritehand.FarseerHelper.dll!Spritehand.FarseerHelper.BoundaryHelper.GetPointsForElement(System.Windows.UIElement element, System.Windows.UIElement containerElement, bool positionOnly) + 0x2b bytes 
  Spritehand.FarseerHelper.dll!Spritehand.FarseerHelper.PhysicsSprite.PhysicsSprite(FarseerGames.FarseerPhysics.PhysicsSimulator physicsSim, System.Windows.Controls.Canvas parentCanvas, System.Windows.UIElement element, System.Collections.Generic.List<System.Windows.Point> points, bool showDebug, float defaultFriction, System.Windows.UIElement boundaryElement, float collisionGridSize) + 0x296 bytes 
  Spritehand.FarseerHelper.dll!Spritehand.FarseerHelper.PhysicsControllerMain.AddPhysicsBody(Spritehand.FarseerHelper.PhysicsObjectMain physObject) + 0x121 bytes 
  Spritehand.PhysicsBehaviors.dll!Spritehand.PhysicsBehaviors.PhysicsObjectBehavior.controller_Initialized(object source) + 0xd bytes 
  Spritehand.FarseerHelper.dll!Spritehand.FarseerHelper.PhysicsControllerMain.InitializeObjects() + 0x3d bytes 
  Spritehand.FarseerHelper.dll!Spritehand.FarseerHelper.PhysicsControllerMain._timerInitialize_Completed(object sender, System.EventArgs e) + 0x37 bytes 
  System.Windows.dll!System.Windows.CoreInvokeHandler.InvokeEventHandler(int typeIndex, System.Delegate handlerDelegate, object sender, object args) + 0x163 bytes 
  System.Windows.dll!MS.Internal.JoltHelper.FireEvent(System.IntPtr unmanagedObj, System.IntPtr unmanagedObjArgs, int argsTypeIndex, string eventName) + 0x161 bytes 
  [External Code] 

I tried with three different images but I always got the same result.

I'm including the XAML code of the page, if it could be of help. Again thanks for your help.

	
		
			
		
		<!--TitlePanel contains the name of the application and page title-->
		
			
			
		

		<!--ContentPanel - place additional content here-->