This project has moved and is read-only. For the latest updates, please go here.

Textures and Farseer

Oct 21, 2010 at 9:59 AM

Just a quick question. I see alot of converting textures to polygons for use with Farseer Physics Engine, but is it possible to just attach a texture to a shape. Im just looking at the Hello World example with the ball and the platform. Say for instance I just wanted to say that the circle has a basketball texture, that I create the texture, and just attach it to the circle fixture. Is this method not possible?

Oct 21, 2010 at 4:12 PM

I'm far from an expert here but I did exactly that. I have a video where I do this: (I needed help with another problem but you can see the Richard Simmons mug on the CircleShape)

I basically don't tell anything to farseer about my textures or colors (because it doesn't care for that scenario)

Oct 22, 2010 at 2:41 AM

BigBob -

The physics engine only provides the position and rotation of the objects in the simulation it's up to you to draw a texture at that position and rotation. Be sure to draw your texture with the origin vector set to the center of the texture. Let me know if this helps.