- Home /
Question by
unity_kT4mS3MZwGMX5w · May 11, 2020 at 08:24 AM ·
physicstrajectory
,How can I create trajectory line in my arrow shooting game that use addForce() function?
,I use mouse position to calculate the the force that needed to be add in my arrow to shoot it. How can I show the projectile path of the arrow that will travel. My code look something like this...
arrow.GetComponent<Rigidbody>().AddForce (Quaternion.Euler (new Vector3(transform.rotation.eulerAngles.x,transform.rotation.eulerAngles.y,transform.rotation.eulerAngles.z))*new Vector3(25f*length,0,0), ForceMode.VelocityChange);
Comment