Skip to content

Instantly share code, notes, and snippets.

View YaBoyCJ's full-sized avatar

YaBoyCJ YaBoyCJ

View GitHub Profile
@jeffcrouse
jeffcrouse / Hover.cs
Created January 29, 2018 23:34
A handy script for making a Unity GameObject rotate and "wobble" with exposed parameters for speed and amount.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/**
* Lessons:
* 1. Scripts are mini-programs that operate on a GameObject in your scene.
* 2. How to get a component of the GameObject this script is attached to?
* 3. How to modify that component over time.
* 4. FIX IN CLASS: There is actually a shortcut to get the transform of the GameObject.