- Home /
Question by
ZombaScripts · Sep 09, 2018 at 02:19 AM ·
raycastposition
Just can't get this Player to move on the x axis?
Get get this to work????
capture.png
(27.9 kB)
Comment
Answer by Stratosome · Sep 09, 2018 at 03:02 AM
Yep, unfortunately you aren't allowed to directly modify the x, y, and z components of the position vector on objects. You can set the vector itself though, so:
Player.transform.position = new Vector3(GeneralTargetPosition.x, Player.transform.position.y, Player.transform.position.z);
It is a bit inconvenient, but it's the way it is I guess.
Your answer
