Change the orientation point ?

Topics: Developer Forum
Aug 7, 2010 at 7:58 PM

Is there a way to change orientation point, so that object don't rotate in the middle but somwhere else . Anyone ?

Aug 8, 2010 at 3:27 AM
Edited Aug 8, 2010 at 3:27 AM

In FP3 you can use Body.GetMassData, then change the MassData.Center to the value you want, then call Body.SetMassData to update the body.

I haven't actually tried it but I think it should work.

Aug 9, 2010 at 8:39 AM
robertdodd wrote:

In FP3 you can use Body.GetMassData, then change the MassData.Center to the value you want, then call Body.SetMassData to update the body.

I haven't actually tried it but I think it should work.

Thanks robertdodd ! :)

Everyone is talking about FP3, but I can't find where to download it, in downloads there is only version 2.1.3 to download. Can you give me the link to download it ?

 

Thanks in advance :)

Aug 9, 2010 at 9:04 AM
You get FP3 by the source code. If you click on source code at the top menu, you can then click the "Download" link inside the "Latest Version" box. Keep an eye on the comments of the checkins, however, since you might download a broken build.
Nov 9, 2010 at 7:34 PM

it seems Body.SetMassData doesnt exist. and only setting MassDataCenter via a GetMassData instance doesnt update the Body. Any hints ?

 

Regards,

Thorsten

Coordinator
Nov 9, 2010 at 7:57 PM

Have you tried Body.LocalCenter?

Nov 9, 2010 at 8:34 PM

Hey Genbox,

thanks for the quick reply. And yes i did. It didnt change anything for me (at least DebugView with the CenterOfMass flag set doesnt show any difference)

 

Regards,

Thorsten

Coordinator
Nov 9, 2010 at 8:55 PM

Try downloading the latest source control change-set. It works here. (F5 enables and disables the CenterOffMass flag in the DebugView)

Nov 10, 2010 at 10:15 AM
Edited Nov 10, 2010 at 10:18 AM

Thanks Genbox. Gave it a try but it still doesnt seem to work. Tho i am not sure i have the right dll loaded.

I am still having issues understanding c# and vs2010 properly. Initially when starting my project from scratch it wouldnt compile due to the missing

DLL. After some fiddling (Adding it as a reference and playing with reference parts) it worked. But now i tried to compile the latest Changeset

and to make sure i have the right one loaded i removed the reference. But it still automagically finds the DLL somehow it seems.

 

More digging. Thanks for the input tho!

Regards,
Thorsten

P.S. Completely off-topic, but is there a way to do a XNA4 install without all the windows phone and "just for eval" references ? Can't i have

a valid VS2010 Express install with XNA4 as an addon ?

 

 

Nov 10, 2010 at 10:21 AM

K, just found why. I had the DebugView compile path set as reference path and it also contains the Farseer dll. F5 doesnt do anything for me tho.

Do i have to specifically register DebugView shortcuts somehow ?

Currently i simply call the DebugView rendering in .Draw()

 

Regards,

Thorsten

 

On a rather important sidenote thanks a LOT for all the effort you put into Farseer, it definately rocks hard!

Nov 10, 2010 at 6:39 PM

Hey again,

seems i found why it wouldnt work for me. Seems i have set localCenter before setting the body dynamic wich in turn seems to reset mass data.

 

Thanks again
Thorsten