View Simple2DSteer.cs
public class SimpleSteerUtility
// This is more of an example to show how the interface functions can be used in a very simple manner.
// Or, this can be your one-stop shop for a single function call in your Update function.
public static void SimpleSteer(ref Quaternion rotation, // ex: transform.rotation
Vector3 dir, // target - position, normalized
Vector3 up, // ex: transform.up
ref Vector3 velocity, // should be stored in your monobehaviour
ref Vector3 position, // ex: transform.position
float rotationSpeed,
View Steering.cpp
struct FPoint {
float x; /**< The X coordinate of the point */
float y; /**< The Y coordinate of the point */
FPoint steer(const FPoint& target, const FPoint& pos, const FPoint& curForward) {
// Direction to target
FPoint dir;
dir.x = target.x - pos.x;
dir.y = target.y - pos.y;
View GizmoIcon.cs
using UnityEngine;
using System.Collections;
/// <summary>
/// This was just a quick-and-dirty tool when inside the Unity Editor.
/// Need an Icon on something? Throw this on it, assign a texture (via URI string), done.
/// </summary>
public class GizmoIcon : MonoBehaviour {
public string IconFile;
View CloudGenerator.cs
using UnityEngine;
using System.Collections;
/// <summary>
/// Generates random "clouds" (or whatever you want the prefab to be) along an X-Z plane
/// using PerlinNoise.
/// </summary>
public class CloudGenerator : MonoBehaviour {
/// <summary>