How to write a script that will move my player in the direction in which I look?
Posted: Mon Dec 10, 2018 8:38 pm
Hey Guys.
That's me again. I am stuck with something different.
My idea is: Move the Player for about 2 metres in X and Z only pos. where you are pointing the cursor / when you are looking at the moment.
So I found all cords of my player - X, Y and Z - I can move my player to any cord that I want but... how to write a script that when I press ONE BUTTON, it will move my player for 2 metres for example in the direction in which I look.
I am thinking that I must somehow connect X and Z pos. in one script but I don't know how to do it.
I was trying to find any tutorials about it, but there isn't any tutorials about it
Please help me guys.
Thanks.
That's me again. I am stuck with something different.
My idea is: Move the Player for about 2 metres in X and Z only pos. where you are pointing the cursor / when you are looking at the moment.
So I found all cords of my player - X, Y and Z - I can move my player to any cord that I want but... how to write a script that when I press ONE BUTTON, it will move my player for 2 metres for example in the direction in which I look.
I am thinking that I must somehow connect X and Z pos. in one script but I don't know how to do it.
I was trying to find any tutorials about it, but there isn't any tutorials about it
Please help me guys.
Thanks.