[Help] Following Objects
#3

Its a small hand full math.
By default, the rotation the pet has to have can be calculated like this:

a: the y-coord difference of the pos of the object and the target
b: the x-coord difference
c: sqare root (aІ + bІ)

rotation of object = arcsin (a / c)

So: get the position of object and target and transcribe this to pawn, in one or more lines (arcsin = asin in pawn)

Edit: You also have to add something (180 i think) to the calculated rotation for samp
Reply


Messages In This Thread
[Help] Following Objects - by borisblat - 09.07.2010, 20:56
Re: [Help] Following Objects - by dovys11 - 09.07.2010, 21:01
Re: [Help] Following Objects - by Mauzen - 09.07.2010, 21:10
Re: [Help] Following Objects - by borisblat - 10.07.2010, 06:37
Re: [Help] Following Objects - by borisblat - 10.07.2010, 09:02

Forum Jump:


Users browsing this thread: 2 Guest(s)