This is a repository for Unity3D scripts.

 

General Scripts

BindToGameObject

This script when attached to a Game Object and given a Game Object to bind to will make the hosting Game Object stay with the given Game Object regardless of where it moves.

GameObjectControler

This script simply allows the hosted game object to be moved with the keyboard input, for example, a camera.

GameObjectDeath

This script will remove an object (kill it) from the game when the object collides with another object, either/or after a set period of time. You can even specify a number of tags that are ignored when collided.

GameObjectRotateAboutPoint

This script will make the host object rotate around a given point.

GameObjectRotator

This script will make the host object rotate on a given axis at a given speed.

PathPlotter

Simple script enables you do plot paths in the editor then, have the hosting Game Object move along that ploted path.

PointInDirectionOfMotion

This script is used to keep an object pointing in the direction it is moving, based on its last position (no RigidBody needed)

PointInDirectionOfVelocity

Same as above, but based on the objects RigidBody

HelperClass

This script holds global helper functions

 

Terrain Scripts

TerrainGenerator

Script to generate a basic terrain from a height map

Shaders

TerrainShader

Basic Terrain shader

Shader used to render the terrain generated by the TerrainGenerator script

PlanetShader

Planet Shader

Using colour, bump map, city light and cloud maps to render a planet

Last edited Dec 20, 2013 at 12:10 PM by NemoKrad, version 9