Calculate vector position based on angle and direction
#3

Just add another 90 degrees and then you can get from A to C using the 'facing forward' code. Its coords are 3(sin(18.4+90),cos(18.4+90)). Then to get D just do C+B-A. In GTASA reverse degrees it's like this:
Код:
cx += 3 * floatsin(-a-90, degrees);
cy += 3 * floatcos(-a-90, degrees);
dx = cx + ax - bx;
dy = cy + ay - by;
Or you can just calculate D from B the same way.
Reply


Messages In This Thread
Calculate vector position based on angle and direction - by jeffery30162 - 08.04.2016, 02:59
Re: Calculate vector position based on angle and direction - by Sascha - 08.04.2016, 12:28
Re: Calculate vector position based on angle and direction - by mooman - 08.04.2016, 18:18
Re: Calculate vector position based on angle and direction - by jeffery30162 - 13.04.2016, 14:39

Forum Jump:


Users browsing this thread: 1 Guest(s)