- Home /
Make many Rigid Bodies follow a specific one
My player is being followed by a couple of small meshes along the game (sidescroller). Each of them has a Rigid Body and a Box Collider attached. The movement is done with rigidbody.MovePosition. The problem is, it starts to lag when the number of following objects becomes more than about 50 (on an iPad 3). Is there any good way to optimize this? Thanks.
Answer by AlanMattano · Mar 15, 2017 at 06:08 PM
Use Is Kinematic:
If lag or more than 10 or is far away
rb.isKinematic = false;
Now move the object by setting a new position and then
rb.isKinematic = true;
Your answer
![](https://koobas.hobune.stream/wayback/20220613135718im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Can you move a rigidbody without causing it to activate? 3 Answers
Rigidbody Overhead 1 Answer
Poor performance setting Rigidbody.position many times per frame 0 Answers
RigidBody causes heavy performance issues 1 Answer
Vertices limit for iOS? 0 Answers