NOTE: the y val is -100 regardless, the problem is with the x and z values.
I’m using input.mouseposition for the vector 3 in instantiate:
GameObject.Instantiate (object, Input.mousePosition, transform.rotation);
when I click on the screen the object appears around (400, y, 0) but where I’m clicking is around (-18, y, 25). any ideas whats going on? I tried to correct the differences with this but it only worked in the positions I stated above.
private int YPos = -100;
private float XPos = -0.04215457f;
void Start () {
transform.position = new Vector3(transform.position.x * XPos, YPos, (transform.position.z + 0.1f) * 250 );
}