Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Im using Farseer Physics with Xna 4.0. Im following a starter guide. It said that to draw, I need to convert the meters to pixels with the ConvertUnits namespace. I looked through all of the engine, but I cant find the ConvertUnits class. Im basicly stuck without it. Where is it stored, or do I need another resource?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Starting with 3.x, FPE(Farseer Physics Engine) now uses the MKS (Meter-Kilogram-Second) system of units.

The ConvertUnits class can be found under Farseer Physics Engine 3.3.1 Samples XNA\Samples XNA\Samples XNA\ScreenSystem. ConvertUnits is a helper class that lets us switch between display units (pixels) and simulation units (MKS) easily.

This file can be downloaded here: http://farseerphysics.codeplex.com/releases/view/64108

Original Post at: http://farseerphysics.codeplex.com/discussions/247635

So you basically need to add the ConverUnits.cs file to your project, and you should be able to convert meters to pixels just fine :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.