Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Mordeth

GetActorAngle weirdness

Recommended Posts

To get the byteangle of a Thing with a tag N, you use "GetActorAngle(N) >> 8".

In ZDoom, facing straight east translates to a byteangle of 0, north to 64, west to 128 and south to 192. In EE, the same directions translate to 0, 63, 127 and 191. I've mentioned this before, but still no big issue.

But: in EE, while an angle of 0 degree (east) translates to a byteangle of 0, an angle of 1 degree translates to a byteangle of (again) 0, and an angle of 2 degrees to a byteangle of 1. This is not consistent and leads to problems.

Share this post


Link to post

From the look of it the function does exactly the same in both, which leads me to believe that the angle actually IS slightly different. Keep in mind that there's a loss of 24 bits of precision from the internal binary angle to the byte angle you get in the end. Even some minor deviation in the lower bits will be enough to trigger such a discrepancy.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×