Exemple #1
0
transform.position = Vector3.Lerp(gameObject.transform.position, new Vector3(Mathf.Clamp(gameObject.transform.position.x + moveHorizontal, -2.5f, 2.5f), gameObject.transform.position.y, gameObject.transform.position.z), directionalSpeed * Time.deltaTime);
Exemple #2
0
 public static Single Clamp01(this ref Single x) => x = Mathf.Clamp01(x);
 return(new Vector2(Mathf.Clamp(v.x, min.x, max.x),