Posted August 15, 20169 yr I wanted to see if there was a simple or easy way to detect how fast a mob is turning left or right and have the value sent or used in its respected model class(es) before attempting to write something on my own. I do not necessarily need actual code but it something is open source to look at, great! If not, some general ideas such as what functions or classes to use or write would be helpful too. If I would have to do the detection in the server side Entity class and send it to the client side Model class. If that is true, I might ask for the least resource intensive way to send that information there.
August 15, 20169 yr Author When I run a test of what those values are in the model class or in the Entity's LivingUpdate(), prevRotationPitch and rotationPitch are always the same value. Is there a difference between them?
August 17, 20169 yr Author I am actually working on mob model animation to give the illusion of my mobs' parts obeying physics better (such as a mob with a long tail turning around). Eventually I'll move on to jumps and falling. I played around for a while and decided the variable, renderYawOffset, seemed to work best for my needs. The biggest challenge I had to face was what you mentioned with the rotation amount rollback but I did overcome that after a few hours. All the math I have handled in the client side version of the Entity class which the model class just calls over the results so as to ensure it is unique to that mob. It works great. Thanks, your suggestions gave me a good idea of where to even start trying this. You say you do this in your mod's animations? Which mod is that?
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.