I’m using FarSeer and XNA.
Is there an easy way to resize or scale a FarSeer body ?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I was looking for a solution to this and stumbled upon your thread at the official forum. Here’s what I could gather from looking at the official forum posts and the Farseer source code:
When using body factory, the width/height/radius parameters are supplied to calculate its moment of inertia only. The body class itself doesn’t have width/height fields or properties.
I think what you are looking for is how to resize geom, which is the thing matters in collision detections.
The Geom class (rectangles, circles and whatnot) doesn’t have width/height/radius fields or properties either. Instead it is defined by a set of vertices, so in order to resize the geom we will need the ability to modify vertices. The geom class has a public method for this:
For resizing we just need to perform arithmetic operations on the vertices. Haven’t had time to test it out myself but this should be where we start.