I am making a dart game and I need the dart to move to the position of the targeting reticle but still remain off camera. Basically I want the dart to move to the reticle’s position but only on the X and Y planes.
I have been using this:
transform.position = new Vector3(lastRetPos.x, lastRetPos.y, Z);
Where “lastRetPos” is the position of the reticle and “Z” is a constant.
Now, in my conception, this should move the dart to the reticle’s position but not forward as Z is set to a negative number. However, the dart is always moved exactly to the reticle’s position, seemingly ignoring the constant negative.