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

Planetary gravity

Topics: Developer Forum, User Forum
Mar 17, 2009 at 4:59 PM
Is there a sample anywhere that shows how to implement planetary gravity/orbital mechanics?
Mar 17, 2009 at 5:14 PM
We currently don't have an official sample on how to create planetary gravity, but if you download the latest source code checkin, you will have a new controller called GravityController. You just place your bodies on the screen as you are used to, then you just use the ComplexFactory.Instance.CreateGravityController(). Give it a list of bodies or a list of points where you want the gravitypoints to be.
Mar 17, 2009 at 7:18 PM
sweet....I assume I will be able to controll how strong the gravity is on those points, right?
Mar 17, 2009 at 10:55 PM
Speaking as the person who primarily developed that code, you can control how strong the controller is (make all of the points stronger/weaker). Although, that would be interesting if i added a feature to allow a per-point strength. There's a couple of other things dealing with planetary gravity (GravityField and GravityBody) so be sure to check them out.
Mar 17, 2009 at 11:02 PM
Hello rogue how do i implement this patch into my solution?
Mar 18, 2009 at 12:21 AM
See the patch thread you made.