you need :
Trigonometrie and Pythagoras!
Trigonometrische Funktion
Satz des Pythagoras
HF and GL
In Frostzorn's Server Control a saw 6 Buttons which allows you to teleport in the "View-Direction".
How did he did it?
I know, how to teleport a player in X,Y,Z direction
Player 1: Up;Down : 01D00FE4
Player 1: North;South : 01D00FDC
Player 1: West;East : 01D00FE0
I also found the "Viewangle" or "Viewdegree" (don't know how to call it)
Player 1 (Every adress returns the same value (float):
P1View1: 01D0111C
P1View2: 01D045B8
P1View3: 01D046A4
If you are looking in a 180° angle from 0,1°North to 179,9°South on the EAST side (real compass), the Value IS NEGATIV.
Example:
MW3 East = -90°
"Real East" = 90°
If you are looking in a 180 angle from 359,9°North to 180,1°South on the WEST side (real compass), the Value is POSITIV.
Example:
MW3 West = 90°
"Real West" = 270°
My Question:
Is there any solution for calculating where "forward" is with these 6 adresses?
I hope you understood what i want to reach.
=> No teleport on X,Y,Z Axis BUT teleport on view-direction.
Thanks for any help!
Maybe my Player 1 Viewangle adress just helped you
Hint:
P1View1 + 38EC = P2View1
P2View1 + 38EC = P3View1
and so on...
[Please apologize my english, i'm not a native english speaker]
Last edited by hoschi111; 08-14-2012 at 07:41 AM.
you need :
Trigonometrie and Pythagoras!
Trigonometrische Funktion
Satz des Pythagoras
HF and GL
Last edited by Frostzorn; 08-15-2012 at 03:51 PM. Reason: nothing
Hätte ich fast schon gedacht
[I'd expected it]