I’m making 2d side scroller shooter with Unity. There are 2 main things that have rigidbody2d: Characters and weapons. Characters are player and enemies, and weapons are just weapons.
However when I run the game, frequently lag spike happens, and in my android phone is worse. So I opened profiler and in the moment game goes really slow, there are lots of Physics2D stuffs working. In that moment, there was 80 rigidbodies(and 60 is active, and rest is sleeping).
I can find using physics in mobile is quite heavy very easily. Is this bad idea to exists 80 – 100 rigidbodies in android device?
Also currently I try to find some alternative, not use physics to move character but couldn’t find any helpful information. Even Unity’s official tutorial uses Rigidbody to move character. If I don’t use rigidbody and collider, how do I implement character stuck in the wall or something? Any advice will very appreciate it.