thebest108 Posted November 6, 2015 Posted November 6, 2015 This has been bothering me too much. No matter what I do, I can't seem to fix the stutter caused by receiving new positions. So currently Im sending a packet every tick with the ship's position and velocity and orientation. Im also storing the values of the previous packet received. Even though angular momentum interpolates perfectly, using the same method for translation has "mixed results". Judge for yourself [embed=425,349]<iframe width="560" height="315" src="https://www.youtube.com/embed/dpW0NITzrHw" frameborder="0" allowfullscreen></iframe>[/embed] As you can see the translation is constantly stuttering. Im getting the values using this moddedX = ship.posX+((ship.interpController.latestVelocity.X)*partialTicks); moddedY = ship.posY+(ship.interpController.latestVelocity.Y)*partialTicks; moddedZ = ship.posZ+(ship.interpController.latestVelocity.Z)*partialTicks; Does anyone know a simple interpolation method? I really want to get this released soon Edit: I can't simulate any of the physics on client side and then correct because it's a dynamically changing rigid body, meaning its mathematically impossible to get anything relevant from running it on client. Im just running on velocity here Quote "you seem to be THE best modder I've seen imo." ~spynathan ლ(́◉◞౪◟◉‵ლ
Abastro Posted November 6, 2015 Posted November 6, 2015 You should correct unit of latestVelocity to be block/tick. Quote I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
Ne0NAfr0 Posted November 6, 2015 Posted November 6, 2015 Now, I am no genius, but even if you update it every tick would that not be fast enough? I mean, there are 20 ticks per second I think, right? That means that your ship would be suck updating at the equivalent of 20 fps...? Now if you change your Minecraft max fps to be 20, you will notice how terrible that is, so It is no doubt that it looks choppy when being updated. Keep in mind, I am a complete newb here, and I know not a lot about Forge etc, so I am sure there is some way around that. Quote .|\| E0 |\|. /\ Fr0
Ne0NAfr0 Posted November 6, 2015 Posted November 6, 2015 Actually, I am not sure if my last comment applies here, because I think you are handling it differently than how I had thought. So maybe just ignore that last suggestion. I had thought you were updating the position every tick rather than just sending the packets. Sorry Quote .|\| E0 |\|. /\ Fr0
TrashCaster Posted November 6, 2015 Posted November 6, 2015 Like diezieben07 said, interpolate between old and new variables. The way it is usually done in Minecraft is, for example, with rotation: float renderYaw = entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw)*partialTicks; So you use the same formula for position, scale, rotation, all that. Quote
Recommended Posts
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.