This project has moved and is read-only. For the latest updates, please go here.

Help with translation from b2d --> xna

Topics: User Forum
Oct 5, 2010 at 5:03 PM


Im trying to duplicate two lines of code from a function made with box2d/flash, and i cant find the equivalent/translation in farseer 3.0

Can anyone help me with this?

The code is:

var sidewaysAxis = targetBody.GetXForm().R.col2.Copy();

(velocity is targetbody.GetLinearVelocityFromLocalPoint(;)

Thanks for your help!

Oct 5, 2010 at 5:39 PM

I'm not sure about the Copy(), you will have to look at the Box2D flash source for that.

The GetXForm() method is named GetTransform(out transform) in FPE 3.0

b2Math.b2Dot()'s equivalent is Vector2.Dot().

Oct 7, 2010 at 3:13 PM

Thanks! Got it working now.