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

Discuss new features and future development.

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

Postby crackprac » Fri Oct 14, 2016 11:54 pm

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?
crackprac
 
Posts: 3
Joined: Fri Apr 22, 2016 4:10 am

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

Postby slembcke » Mon Oct 17, 2016 8:18 am

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/
User avatar
slembcke
Site Admin
 
Posts: 4163
Joined: Tue Aug 14, 2007 7:13 pm


Return to Features/Development

Who is online

Users browsing this forum: No registered users and 4 guests

cron