Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

translate nicely between two vector3

public class LinearTrasnformation : MonoBehaviour {

    public GameObject cube1, cube2;

    // Use this for initialization
    void Start () {
        //cube1.transform.position = new Vector3 (cube1.transform.position.x,cube1.transform.position.y,cube1.transform.position.z);
    }

    // Update is called once per frame
    void Update () { 
        if(Input.GetKey(KeyCode.UpArrow)){
            cube1.transform.position = Vector3.Lerp (cube2.transform.position,cube1.transform.position,0.5f*Time.deltaTime);
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# distinct dictionary 
Csharp :: vb.net tostring numeric format string 
Csharp :: c# null coalescing operator 
Csharp :: c# string split by length 
Csharp :: vscode snippet custom 
Csharp :: listview android studio java 
Csharp :: randon C# 
Csharp :: c# list with only unique items 
Csharp :: c# blazor in .net framework 
Csharp :: app rating within game in unity 
Csharp :: unity new input system get button down 
Csharp :: C# String Manipulation: 
Csharp :: parsons it solutions 
Csharp :: why doesnt the if command work in C# 
Csharp :: unity add text to text field without deleting the old one 
Csharp :: how to use K2 games Games parallax background 
Csharp :: nethereum check gas price 
Html :: trademark symbol 
Html :: blank space html 
Html :: regex href html pattern 
Html :: html telephone link 
Html :: disable-html-form-input-autocomplete-autofill 
Html :: bootstrap col-md-5 center 
Html :: ascii corners 
Html :: viewport meta 
Html :: center iframe 
Html :: how to add a link in html 
Html :: how to validate mobile number in html form 
Html :: html star symbol 
Html :: linear gradient with image 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =