An object facing the players X, Y
#7

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
hope that helps a bit
edit: oh, my plane would be a goundhog. indeed add some units at the z axis for the planes' position ^^
Reply


Messages In This Thread
An object facing the players X, Y - by Lorenc_ - 23.06.2011, 08:04
Re: An object facing the players X, Y - by Sascha - 23.06.2011, 09:06
Re: An object facing the players X, Y - by Lorenc_ - 23.06.2011, 09:33
Re: An object facing the players X, Y - by Sasino97 - 23.06.2011, 12:17
Re: An object facing the players X, Y - by Babul - 23.06.2011, 12:26
Re: An object facing the players X, Y - by Sasino97 - 23.06.2011, 12:33
Re: An object facing the players X, Y - by Babul - 23.06.2011, 13:06
Re: An object facing the players X, Y - by PCheriyan007 - 23.06.2011, 13:55
Re: An object facing the players X, Y - by Sascha - 23.06.2011, 18:22
Re: An object facing the players X, Y - by Lorenc_ - 24.06.2011, 05:53

Forum Jump:


Users browsing this thread: 3 Guest(s)