Jump to content

[1.16.5] Always getting the same result from PlayerEntity.getLookAngle()


Recommended Posts

I'll preface this by saying I'm almost certainly doing something really stupid here, but I'm at a loss. I'm running the following on the client:


player is an instance of PlayerEntity. The problem is that every time I test it, it forces the player to look in the same direction, regardless of where they were looking previously.

The intended behavior is for this to run repeatedly as a potion effect, which will just lock the player's camera direction for the duration, so they can't rotate the camera. That part works fine, it just locks the camera facing the wrong direction. I currently have it running on the client, but I tested it on the server side and it behaves the same way.

Any suggestions would be much appreciated.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.