Code (CSharp): using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(LineRenderer))] public class LaunchArcRenderer : MonoBehaviour { LineRenderer lr; public float velocity; public float angle; public int resolution = 10; float g; float radianAngle; private void Awake() { lr = GetComponent<LineRenderer>(); g = Mathf.Abs(Physics.gravity.y); } void Start() { } private void Update() { } public void RenderArc() { lr.positionCount = resolution + 1; lr.SetPositions(CalculateArcArray()); } Vector3[] CalculateArcArray() { Vector3[] arcArray = new Vector3[resolution + 1]; radianAngle = Mathf.Deg2Rad * angle; float maxDistance = (velocity * velocity * Mathf.Sin(2 * radianAngle)) / g; for(int i = 0; i <= resolution; i++) { float t = (float)i / (float)resolution; arcArray[i] = CalculateArcPoint(t, maxDistance); } return arcArray; } Vector3 CalculateArcPoint(float t, float maxDistance) { float z = t * maxDistance; float y = z * Mathf.Tan(radianAngle) - ((g * z * z) / (2 * velocity * velocity * Mathf.Cos(radianAngle) * Mathf.Cos(radianAngle))); return new Vector3(0, y, z); } I have this code but when I rotate a ball trajectory line position does not change because I don't know how to do it. How can I change trajectory's x position when I change ball's rotation?