JimJ
Normal12mo ago
7 replies
Jim

Ensuring Rigidbodys are asleep when not needed

I have a game with 500-1000 Rigidbodys but only a small proportion of those rigidbodys are used.

Client 1 starts the game and all rigidbodys with RealtimeViews and RealtimeTransfoms are sleeping. All rigidbodies have a simple rigidbody.Sleep() method in the start event function.

Client 2 starts the game but for some reason that I do not understand, subsequent clients start with all rigidbodys being awake. Having checked in the inspector as client 2, I can see that the current owner of these awake rigidbodys is None.

How do I ensure if a rigidbody is not being interacted with, it is asleep for all clients?
Was this page helpful?