Skip to content

Instantly share code, notes, and snippets.

View ovbm's full-sized avatar
😷

Olivier Baumann ovbm

😷
View GitHub Profile
@oliverholmberg
oliverholmberg / orbital_gravity_2d.cs
Last active February 21, 2023 10:26
Orbital Gravity 2D - A demonstration of Orbital Gravity in a 2D Unity Game. Unity's standard physics engine implements gravity only in the vertical axis. Here's a demo of orbital gravity for space type games. It allows for one object (spaceship, satellite, etc.) to achieve a stable organic orbit around another object (planet, moon, star, etc.)
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
// Intended to be attached to a GameObject in order for that object to have its own gravity.
// Standard Unity Gravity is disabled on objects implementing this class
// This class is pared down from the original WorldBodyController used Oliver Holmberg's game Apogee to simply demonstrate orbital gravity.
public class OrbitalGravityObject : MonoBehaviour {
@vitalbone
vitalbone / keystone2heroku.md
Last active January 1, 2023 23:35
Deploying KeystoneJS to Heroku

Deploying a Keystone App to Heroku

Keystone comes completely set up to install on Heroku in a couple of steps.

1. Sign up for a Heroku account and install the Heroku Toolbelt.

Log in with it and you're ready to begin. Heroku uses git to deploy a new site, so with that in mind:

2. Create a new repository on Github and then clone it.