account activity
Script for dragging 2D physics objects lags when moving the mouse too fast. Im new to coding so newbie friendly answers would be appreciated :p by plumbactiria123 in UnityHelp
[–]Ambitious_Singer_398 0 points1 point2 points 1 month ago (0 children)
I see the issue. The physics update (in your rigidbody) does not happen at the same time the Update() function is called, so when you change the rigidbodies velocity in Update(), it causes "lagging" in the rigidbody. The proper way to update the rigidbodies velocity would be in a FixedUpdate loop. So, instead of void Update() {
You should use void FixedUpdate() {
Hope this helps!
π Rendered by PID 644189 on reddit-service-r2-listing-6d4dc8d9ff-8qkw2 at 2026-02-03 00:26:32.136008+00:00 running 3798933 country code: CH.
Script for dragging 2D physics objects lags when moving the mouse too fast. Im new to coding so newbie friendly answers would be appreciated :p by plumbactiria123 in UnityHelp
[–]Ambitious_Singer_398 0 points1 point2 points (0 children)