[Solved]Objects shake when moving if the fps is low


#1

Hi,I use rigidbody.addForce() to move the player in my project,it’s fine when the fps is 60,but when I edit the project on my old PC or play it on the mobilephone,the player shakes when moving.I think this is related to the low fps,or it has something to do with the engine?Is anyone have the same problem?Can someone give me some advice?Sorry for my poor English:joy:


#2

Can you share a project link?


#3

Oh,sure,you can find it here:https://playcanvas.com/editor/scene/664196
btw,I‘ve noticed that when I use postUpdate to set the camera position instead of update,this problem seems to be solved,is there any realation?Thanks for your reply anyway-v-


#4

It’s most like due to script order being different on platforms/built version. If the camera is updated before the player object, then it causes a judder as the camera is always a frame behind. PostUpdate on the camera means that the camera position is updated after all the update calls from the scripts is called.


#5

Thank you so much:grinning:
I haven’t noticed the script order accturally:sweat_smile: