Page 1 of 1

how to make an object as center of gravity like a planet?

Posted: Fri Oct 14, 2016 11:54 pm
by crackprac
hi I am making a game like angry bird space, I created a planet and tried to change the space gravity vector according to the position of the star. but it doesn't work :( then i used the difference vector for the position of planet and star for the revolution of planet it worked but i have so many things associated with one star if i how should i define the space gravity to give real space effect?

Re: how to make an object as center of gravity like a planet

Posted: Mon Oct 17, 2016 8:18 am
by slembcke
Have you looked at the "Planet" demo that comes with Chipmunk? https://github.com/slembcke/Chipmunk2D/ ... anet.c#L36