- Home /
This question was
closed Apr 27, 2013 at 04:58 PM by
Eric5h5 for the following reason:
Duplicate Question
Moving object with vector3 lerp
Hi, I am currently creating a menu and I want the camera to move gradually to a position when a button is pressed. I have tried using a Vector3.Lerp but cannot get it to work well.
Here is my script:
var StartGame = false;
var Quit = false;
var Options = false;
var camera : GameObject;
function OnMouseEnter ()
{
renderer.material.color = Color.yellow;
}
function OnMouseExit ()
{
renderer.material.color = Color.white;
}
function OnMouseUp ()
{
if(StartGame == true){
Application.LoadLevel(1);
} else if(Quit == true){
Application.Quit();
} else if(Options == true){
camera.Vector3.Lerp(0, 5, 0, 4);
}
}
Comment
This is a duplicate question.
http://answers.unity3d.com/questions/17076/how-to-lerp-between-to-vector3-positions-c.html
Follow this Question
Related Questions
Getting vectors on an object every so many units 0 Answers
vector3 lerp based on 2 different floats/axes? 1 Answer
How to make a drag and drop menu in 2d for a 3d game (sims 4 furniture like) 0 Answers
Object movement with smooth start and end? 2 Answers
Distance between a gameObject and a direction vector. 1 Answer