-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first stab at scripted intro camera fly-in, using unity 3.x animation…
… curves
- Loading branch information
1 parent
b602d47
commit ec6a4be
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#pragma strict | ||
|
||
var pathName : String = "WormLoop"; | ||
var crawlTime : int = 15; | ||
var Loop : boolean = false; | ||
var cameraMove : boolean = false; | ||
var cameraLookTarget : GameObject; | ||
|
||
function Start () { | ||
if (cameraMove == true) { | ||
iTween.MoveTo(gameObject, | ||
iTween.Hash("path",iTweenPath.GetPath(pathName), | ||
"orienttopath", false, | ||
"looktarget", cameraLookTarget.transform, | ||
"axis","x", | ||
"looktime", 3.0, | ||
"lookahead", 0.05f, | ||
"time", crawlTime, | ||
"easetype", "easeInOutSine")); | ||
} | ||
} | ||
|
||
function Update () { | ||
|
||
} | ||
|
||
//"easetype", iTween.EaseType.easeInOutSine causes strange flip at end of loop. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#pragma strict | ||
|
||
var PlayerObject : GameObject; | ||
var introCamera : GameObject; | ||
var mainCamera : GameObject; | ||
|
||
var UIscriptName : GameObject; | ||
var UIscriptComponent : fallingUITest; | ||
|
||
function Start () { | ||
UIscriptComponent = UIscriptName.GetComponent(fallingUITest); | ||
UIscriptComponent.HideGUI(); | ||
|
||
} | ||
|
||
function EndIntro () { | ||
PlayerObject.active = true; | ||
introCamera.active = false; | ||
mainCamera.active = true; | ||
} |