enjarai/do-a-barrel-roll

Inaccuracy movement

Opened this issue · 9 comments

When player's yaw is in (0 ~ 5) or (91 ~ 359), roll is 0. In that case, without any input, player will automatically yaw left until it gets 90
.
yaw 0 means north.

Not sure what you mean by this. If yaw was being applied constantly, I think I'd have noticed by now.

Sorry for bad English.
Yes, the yaw is apply constantly when you facing all directions expect Northeast.
It surely will happen when roll is 0.

What version of the mod and minecraft are you using?

1.19.2

Are you perhaps using Optifabric?

No optfabric

Can you send a video of the issue? Its hard to understand when its just words.

You can see it slightly yaw left when roll is negative even it is close to 0, this is not happening when roll is close to 0 but it positive or it facing Northeast (probably yaw 5 ~ 90 based on my test).
note that roll value at center of the screen is got by ElytraMath.getRoll(yaw, DoABarrelRollClient.left)
video link https://mega.nz/file/duMgQLzB#Ag8kWKyqJugvASrvF4bb1w5OPaS2ixnC0n14ZByyzJQ

Thats quite strange... My best guess would be some kind of floating point precision error.

I've actually already significantly reworked internal math after DABR 3.0, so there's a good chance this issue is already fixed in newer versions. This wont be backported to 1.19.2 tho.

I'll try to recreate this issue on the latest version once I have time.