Skip to content

Instantly share code, notes, and snippets.

View alexinorbit's full-sized avatar

Alexandros Giannakidis alexinorbit

View GitHub Profile
@gunderson
gunderson / FlyCamera.cs
Last active February 10, 2025 17:51
Unity Script to give camera WASD + mouse control
using UnityEngine;
using System.Collections;
public class FlyCamera : MonoBehaviour {
/*
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care.
Converted to C# 27-02-13 - no credit wanted.
Simple flycam I made, since I couldn't find any others made public.
Made simple to use (drag and drop, done) for regular keyboard layout
@AngryAnt
AngryAnt / SelectableObject.cs
Created September 29, 2012 15:40
Example code for "Pick me! Pick me!" blog post on AngryAnt.com
using UnityEngine;
public class SelectableObject : MonoBehaviour
{
public Rect m_SelectionWindowRect = new Rect (10.0f, 10.0f, 300.0f, 100.0f);
public void OnMouseDown ()
{
SelectionManager.Select (gameObject, !SelectionManager.IsSelected (gameObject));
}