Horje
unity move in x seconds to pos Code Example
unity move in x seconds to pos
    StartCoroutine(moveToPosition(yourTransform, newPosition, time));

public IEnumerator moveToPosition(Transform transform, Vector3 position, float timeToMove)
    {
        var currentPos = transform.position;
        var t = 0f;
        while (t < 1)
        {
            t += Time.deltaTime / timeToMove;
            transform.position = Vector3.Lerp(currentPos, position, t);
            yield return null;
        }
    }




Csharp

Related
unity enable hdr picker Code Example unity enable hdr picker Code Example
overridable method C# Code Example overridable method C# Code Example
unity predicts rigidbody position in x seconds Code Example unity predicts rigidbody position in x seconds Code Example
ado .net nullable int datareader Code Example ado .net nullable int datareader Code Example
asp net identity login failed for user Code Example asp net identity login failed for user Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7