Home > other >  Unity to move along a specified Angle? For example, in 2 d space moving distance of 10 meters to 138
Unity to move along a specified Angle? For example, in 2 d space moving distance of 10 meters to 138

Time:09-23

The request of the great god answered... I always feel there must be a method of...

CodePudding user response:

I can give a train of thought, the current coordinates to polar coordinates, and then calculate the position after 138 degrees 10 meters, then turn it back cross coordinate system,
High school mathematics is very important. It's a pity that I don't remember,

CodePudding user response:

Perfect don't thank

CodePudding user response:

Pythagorean theorem know hypotenuse 10 with the Angle of 138
Calculate the edge y and limb x

Then move x y

CodePudding user response:

Calculation in the game space, had better use vector.
  • Related