This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public float speed; | |
Vector3 targetPosition; | |
void Update() { | |
transform.position = Vector3.MoveTowards(transform.position, targetPosition, Time.deltaTime * speeed); | |
if(Vector3.Distance(transform.position, targetPosition) < 0.1f) { | |
targetPosition = Random.insideUnitSphere * 10; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Sounds can be played with AudioManager.PlayClip() or with an AudioSource in the scene. | |
If they're played with an AudioSource, add a LocalSound component to the object so the | |
sounds can be controlled with volume settings in the pause menu. LocalSound also lets | |
you assign a tag to the sound to fade it from code (see below). | |
*/ | |
using UnityEngine; | |
using System.Collections; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System; | |
public class FuncDelegateTest : MonoBehaviour | |
{ | |
void Start() | |
{ | |
Func<GameObject> callback = delegate() { return null; }; | |
RunCallback(callback); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class CameraManager : MonoBehaviour { | |
public Camera cameraOne; | |
public Camera cameraTwo; | |
// etc. | |
public void Start() { | |
// Switch to camera one |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class CameraFader : MonoBehaviour | |
{ | |
public static CameraFader main; | |
public Texture2D blackTexture; | |
private float alpha = 0f; | |
void Awake() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreateGroundPlanes extends ScriptableObject { | |
@MenuItem("Utilities/Create ground planes") | |
static function DoCreateGroundPlanes() { | |
var prefab:GameObject = AssetDatabase.LoadAssetAtPath("Assets/MaxGroundPlanePrefab.prefab", GameObject); | |
var parentObject:GameObject = GameObject(); | |
parentObject.name = "GroundObjects"; | |
var xOffset:int = -50; | |
var zOffset:int = -50; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Mac Users: You may have encountered a situation wherein you left the game while it was still running, and then later tried to return to it, but found yourself distracted -- not just mentally distracted; a state of mental distraction is really not a problem in this game and, in fact, may be helpful in some situations (like when you're visiting a strange rest stop or a comfort station somewhere out on the edge of the map -- there aren't any of these in place in Act One, but perhaps there may be in future acts, after all, it's an idea that appeals to us (we try to be open-minded and not to plan too far in advance) but who can say how we'll feel three or even nine months from now -- and you encounter some text on a sign or something, maybe scrawled in the margins of a discarded roadmap, and you feel curious enough to switch contexts and google some phrase or another) so we're pleased that the Mac version of the game now supports the "Command-Tab" function. Thanks for your patience |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Virtual Sculpture | |
Instructor: Jake Elliott | |
TA: Amanda Vanvalkenburg | |
Mondays 9-4, Michigan 714 | |
This course is about using "virtual sculpture" as an organizing concept when figuring out your Experimental 3D practice(s). We will use a poetically broadened definition of "sculpture" that includes traditional sculpture, conceptual art, performance, installation, and software art. All of these categories of practice can be understood as "manipulations of form within space which can be viewed from different angles." | |
We will be working with several different technologies, but primarily we'll be using Maya and ZBrush for modeling, and Unity3D for creating environments and simulations. | |
Assignments: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get a Matrix4 which contains position, rotation and scale info for the cube | |
var matrix = cube.matrix; | |
// Move the matrix behind and above the cube a bit | |
matrix.translate(Vector3(0, 400, 400)); | |
// Make the matrix's rotation point it at the cube's position | |
matrix.lookAt(matrix.position, cube.up, matrix.up); | |
// Set the camera's position and rotation from the matrix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "VertexInputSimple" { | |
Properties { | |
_SoundWavePosition ("Sound Wave Position", Vector) = (0,0,0,0) | |
_SoundWaveRange ("Sound Wave Range", Float) = 2.0 | |
_SoundWaveWidth ("Sound Wave Width", Float) = 0.1 | |
_MainTex ("Texture", 2D) = "white" {} | |
} | |