23.06.2011, 18:22
Quote:
it seems that the plane is supposed to appear behind the Player (facing the Target), and fly to the position. to obtain the plane start position can be tricky, or easy...
tricky way: calculate it per sinus/conisnus transformations. waste of time in this case, coz the... easy way: subtract the player position from the target position. you will get the offset. then simply subtract the offset from the players position again, you will get the mirrored side, the plane starting position Код:
Target @ 1290,1490,1 ...the target position is east, and a little south of the player. thats like a degree of 95? Player @ 1200,1500,0 ...just a random coordinate... ...the difference is: 1290-1200 = 90 and 1490-1500 = -10 and 1-0 = 1 ...so the start is: 1200-90 = 1110 and 1500-(-10)= 1510 and 0-1 = -1 Start @ 1110,1510,-1 edit: oh, my plane would be a goundhog. indeed add some units at the z axis for the planes' position ^^ |
That wouldn't solve the andro's heading problem, which seems to be the actual problem >> figuring the rotation of the andro out, so that it looks into the direction it flies.