Location 120 feet in front of you
Posted: Sat Nov 06, 2004 9:36 pm
I did some trig to take inputs based on your location, your heading, and the direction you are looking and this math will give you the location of the point 120 feet from the directiion you are looking:
I added lots of spaces. You don't need the spaces but it made it easier to keep track of the parentheses while I was making the code. You can leave the spaces in. Its not "code" persay, but I've put the information you want to look at in code and /code.
Also if you want to change the value of the calculation smaller or larger, change the 120 to whatever you wish. I suggest 20, and 130 units.
Just posted it in case someone could use it in any of their macros or whatever. Heh..took me a while to work out the proper math and test it so there you go.
|------------------------------------------------------------------
Here is something else you all might feel useful
I've added +1 unit N, E, S W, for reasons of practical use. Again. if you want smaller values or larger values change the 10's to whatever. I suggest 10 and 100
I added lots of spaces. You don't need the spaces but it made it easier to keep track of the parentheses while I was making the code. You can leave the spaces in. Its not "code" persay, but I've put the information you want to look at in code and /code.
Code: Select all
Y point = ${Math.Calc[ ${Me.Y}+${Math.Calc[ (120 * ${Math.Cos[${Math.Calc[${Me.Look}/128*90]}]}) * ${Math.Cos[90- ${Math.Calc[ 90-${Me.Heading.Degrees} ]}]} ]} ]}
X point = ${Math.Calc[ ${Me.X}-${Math.Calc[ (120 * ${Math.Cos[${Math.Calc[${Me.Look}/128*90]}]}) * ${Math.Sin[90- ${Math.Calc[ 90-${Me.Heading.Degrees} ]}]} ]} ]}
Z point= ${Math.Calc[ ${Me.Z} + ${Math.Calc[ 120 * ${Math.Sin[${Math.Calc[${Me.Look}/128*90]}]} ]} ]}
Just posted it in case someone could use it in any of their macros or whatever. Heh..took me a while to work out the proper math and test it so there you go.
|------------------------------------------------------------------
Here is something else you all might feel useful
Code: Select all
Locations are X Y Z format
location 10 feet north of you: ${Math.Calc[${Me.Y}+10]} ${Me.X} ${Math.Calc[${Me.Z}+1]}
location 10 feet southof you: ${Math.Calc[${Me.Y}-10]} ${Me.X} ${Math.Calc[${Me.Z}+1]}
location 10 feet east of you: ${Me.Y} ${Math.Calc[${Me.X}-10]} ${Math.Calc[${Me.Z}+1]}
location 10 feet west of you: ${Me.Y} ${Math.Calc[${Me.X}+10]} ${Math.Calc[${Me.Z}+1]}
location 10 feet up from you: ${Me.Y} ${Me.X} ${Math.Calc[${Me.Z}+10]}
location 10 feet down from you: ${Me.Y} ${Me.X} ${Math.Calc[${Me.Z}-10]}
Code: Select all