New to Unity, I used to use Game-Maker a lot. A function I need to use in Unity was in Game-Maker, and I’m looking for it:
lengthdir_x(len,dir) --Returns the horizontal x-component of the vector determined by the indicated length and direction.
So in a nutshell I need a method that when given a length and direction can calculate the total horizontal distance from the start point to the end point of the vector. I know this could easily be solved with some basic math, but I do not know the functions in Unity well and I can’t seem to find good documentation. If anyone could recommend a good source, I’d also be grateful for that. Cheers!