Skip to content

Instantly share code, notes, and snippets.

@keijiro
keijiro / ExpEase.cs
Created April 28, 2011 23:02
Exponential easing out utility for Unity
// Example:
//
// currentPos = ExpEase.Out(currentPos, targetPos, -4.0);
//
// or
//
// ExpEase.Out2(currentPos, targetPos, -4.0); // This modifies currentPos.
//
using UnityEngine;
@Farfarer
Farfarer / characterMotor.js
Created October 15, 2012 09:22
Solve simple IK for character legs on differing ground height for Unity3D.
function LateUpdate () {
if ( collision.grounded ) {
IKOn = true;
}
else {
IKOn = false;
}
ik.solveLegIK ();
}
@michaelbartnett
michaelbartnett / LICENSE.txt
Last active October 17, 2022 10:29
Tuple implementation for use with Unity3d
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@mnogue
mnogue / VirtualJoystick.cs
Last active February 16, 2018 20:22
Virtual joysticks for Unity3D
/*
* The following code is part of a tutorial.
* http://catsoft-studios.com/virtual-joysticks-for-unity3d-mobile-games
*
**/
using UnityEngine;
using System.Collections;
public class VirtualJoystick : MonoBehaviour
@starry-abyss
starry-abyss / ChangeLightScript.cs
Created June 9, 2016 09:25
Storing ambient reflection in Unity 5 for runtime switching
using UnityEngine;
using System.Collections;
using UnityEngine.Rendering;
public class ChangeLightScript : MonoBehaviour {
public Light sceneLight;
public Color fogColor;
public Cubemap nightSkyReflection;
SphericalHarmonicsL2 ambientProbeNight;