Answer by CodeMasterMike
I think that it jerks because you translate it, check if its out of limits, and if it is out of limits, you move it back to within the limits the next frame. Better way to do it, is to check the final...
View ArticleAnswer by criptoonita
Maybe clamp would be more elegant to make limits transform.position = Vector3(Mathf.Clamp(pObject.x, min, max), pObject.y, pObject.z);...
View ArticleAnswer by iuripujol
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Move : MonoBehaviour { public Transform cube; public float dist2; Vector3 initPos; // Use this for...
View Article
More Pages to Explore .....