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

Position a 3D object with Farseer

Mar 22, 2011 at 2:58 PM

Hi guys,

resolved the problems about coordinate conversion, I moved toward, and I tried to do positioning with objects in 3D space, still using 2D physics (in order to realize a 2.5 like engine).
I mean, I've build a class that creates and transforms a colored quad, I've setup the farseer world and fixture in the standard way (without do coordinate conversion with ConvertUnits), and it seems to works good enough. Looking well, I've noticed some flaws in displaying and positioning this quads.
By activating a debug view, I've got an output like this.

For an example, if I've a quad created at (0, -4, 0), with width = 2, and height = 3 (so, it goes from x=-1 to x=1, and y=-2 to y=-5), I make a fixture too at position (0 + width/2, -4 + height / 2), where width and height are the same of the quad object.

I hope I explained myself well. In case someone would look at the source code, just ask for it!



Mar 23, 2011 at 1:38 PM

Okay, I've resolved those position issues with a tiny translation back in the Z-axis of 0.1 pixel. Now seems to work in a reasonable manner, but why? Someone knows?