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

Question about Agent from the samples

Mar 31, 2011 at 7:41 AM

Hello there,

i want to define a agent (class AGENT from the samples) that cannot be moved but can rotate itself around its center, so it can spin. my first try was to attach a gravity controller to its center body( the circle in the middle) but couldn't make, because i don't really understand how the gravity controller works and i can't find documentation about it (my bad i guess). my second idea is to mess with BodyType, add a new body type, for example Fixed, and make it position not able to be changed in the Update method of the Body. i don't want to do that, because i consider it a "hack" in a nicely working system and i will try to avoid that. so i am asking you, how can i achieve what i am asking ? :)


thank you in advance for the help

Mar 31, 2011 at 8:08 AM

Have a look at joints and use a FixedRevoluteJoint.

Mar 31, 2011 at 2:00 PM

Thank you Elsch, the Fixed-revolute joint was kind of hidden for me in the region, but you did point it out :)