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

Discuss new features and future development.
Post Reply
crackprac
Posts: 3
Joined: Fri Apr 22, 2016 4:10 am
Contact:

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

Post 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?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

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

Post by slembcke »

Have you looked at the "Planet" demo that comes with Chipmunk? https://github.com/slembcke/Chipmunk2D/ ... anet.c#L36
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests