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

Negative position allowed?

Topics: Developer Forum, User Forum
Jul 5, 2008 at 3:59 PM
I'm using Farseer on a 2D plane but with 3D graphics.  In this, I have a scene centered around 0,0,0 and have various bodies around the scene.  Although I have Vector2(-450,0) for one of my collision objects, it seems to put itself at (0,0) position wise.  Does Farseer assume everything is on a positive axis?
Jul 10, 2008 at 9:29 AM
No. You are doing something else wrong.
Maybe you aren't drawing the object at the body's position?
Jul 17, 2008 at 7:27 PM

If you are using Model, then you must apply a World transformation to position your model at its "current" location, as given by the physics.

Use Matrix.CreateTranslation().  Don't forget to do your axis transformation xy to xz, since in Model the y-axis points "up".

You must multiply the world matrix with the local transform of your model before rendering, in BasicEffect loop.  Google for example code.