Page 1 of 1

Degrees? Radians? What does Unreal Engine use to store angle

PostPosted: Mon Aug 02, 2010 6:05 am
by iOr
I have recently played the game "Killing Floor" in which the game is created with Unreal Engine 2.

I am trying to create a simple aimbot (Find the object table, read positions from each object, figure the closest object, find the angle to turn using coordinates, set pitch and yaw to the angle calculated from previous step).

Just a tiny bit of problem, I can't find the player's pitch or yaw in the game.

I have done the following:
* Assuming pitch is negative when looking into sky: Did range search; type float; -85 to -90 = Nothing useful
* Assuming pitch is positive when looking into sky: Did range search; type float; 85 to 90 = Nothing useful
* Assuming maximum yaw is 360: Spawned in a new map and searched float 0. Turned opposite of me and searched 180 = Nothing useful
(Same with -180 to 180 yaw; and converted to Radians; still range search, I don't know how accurate epsilon is :P)

Is there something I'm missing to Unreal Engine 2 Euler Angles?

Re: Degrees? Radians? What does Unreal Engine use to store angle

PostPosted: Mon Aug 02, 2010 7:24 am
by L. Spiro
View-direction angles are stored as unsigned short values used in a sin/cos look-up table.

Additional view-direction information can be found by search from 1 to -1 (float) as you look up and down.


L. Spiro

Re: Degrees? Radians? What does Unreal Engine use to store angle

PostPosted: Mon Aug 02, 2010 8:29 am
by iOr
Thanks for the input :D

I was able to find the pitch value (0.999 looking up ~ 1.0f). However I cannot change this value to remain a static value (if I change to 0, I can still freely move my pitch up and down and the value in MHS is changing even though it is already frozen).

But I have my question answered and I appreciate that so much :D.

Edit: Found another pair of Pitch values (Yaw and roll close by as I expected) and was able to lock my position into one view = Working Aimbot :D. Have a cookie