This project has moved. For the latest updates, please go here.

Animated Sprites as body objects

Topics: Developer Forum
Oct 4, 2007 at 9:36 PM
I'm curious how the Farseer deals with animated sprites of different sizes. Is it possible to load character x as a "body" which changes sizes every frame of animation?
Oct 5, 2007 at 9:44 AM
Farseer doesn't know anything about animated sprites and Farseer doesn't really support dynamic size changes as the collision grid is pre-computed. I think what you would want to do in this situation is have a few bodies with geometries that represent different states of your sprite then swap them out as needed by enabling only the one that matches the current state. It won't be perfect but that's the only thing I can think of.