Changing Gravity?

Topics: Developer Forum, User Forum
Jun 18, 2011 at 4:35 PM

Hey all!

I'm considering using Farseer for my next project.  One of the features involved will be real-time adjustment of the gravity -- i.e. you control the gravity as a means of controlling the objects on the screen.  I understand that you pass in a gravity Vector2 when you create a new World, so would I have to create a new World every frame?  Would that even be a big deal performance-wise?

Thanks for the help!
-Pete

Coordinator
Jun 18, 2011 at 5:23 PM

There is a Gravity property on the World object that you can change directly.

We have even more gravitational features if you use the GravityController. But it all depends on your game.

Jun 18, 2011 at 5:25 PM

Okay, thanks for the info.  For some reason I didn't see that the first time, but that should work perfectly.

Thanks!