Physics Object Vibrate/Stutter Bug

 I am working on a demolition derby style game, in which I am using the physics2 engine to control the vehicles.

 To accelerate and reverse the vehicle I apply a force from the center of the vehicle towards to angle the vehicle is looking to make it move forward/backward. To make the vehicle turn I use basic torques positive for turning right and negative for turning left.

 Everything works exactly as intended, however I have a visual issue that it just weird and kind of ruins it. Only when accelerating/reversing the car visually jitters/stutters forward and backwards. It doesn't happen when turning. I've tried finding a fix, I've tried increasing the max speed of the vehicle and lowering the acceleration to see if its not just a situation where the vehicle is maxing speed so quickly that it stops accelerating for a frame. I've increased and decreased the linear damping and it got no better or worse.

 Below is a screenshot of the code used to control the vehicle in case its a problem with my code.

1 Like

Ok, Ive figured out that this only happens when I’m using the “FollowObjectsWithCamera” extension. Which is still a problem because I need the extension for the camera.

Excuse me, I was wrong. Unless I focus the camera on a vehicle it will do the stutter. The game is going to be 4 players and I cant just focus on one car and have the rest a stuttery mess. Any ideas?

I’m not sure if this will work, but perhaps instead of follow object, use:

  • set X of camera to (Lerp(CameraX(),Player.X(),0.08))
  • set Y of camera to (Lerp(CameraY(),Player.Y(),0.08))

It makes the camera move smoothly (btw if it doesn’t look right, try reversing camerx and player x)
hopefully that should work, if not idk.

I think I am experiencing the same thing. If someone knows a solution, I would be grateful. Both my character and vehicle have physics, and both of them jitter/glitch/stutter/teleport a little bit when moving. The player moves with forces, but the vehicle moves with wheel joints. I am still looking around the forum for a solution :D. I don’t think it has something to do with the camera following the player. I tried it without any camera movement and it still happened.

1 Like

I have the same problem. It has nothing to do with the camera. The problems occur even with very simple examples. However, probably only on the PC - in the browser everything runs smoothly.
I have opened a thread as a bug report. Maybe you can confirm your problems here so it can really be identified as a bug and fixed?