Moving on to new object within my scene:

Now is time to move onto the next objects for my project, planets and moons.

Although there is no way to just set an objects gravity to point at another object within the physics world, as the only gravity option in cannon.js are world wide and point in a single direction.

There is an example using the preStep function to simulate this gravity.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s