Should I use Rigidbodies in a top down 2D game if I don't need physics?
I'm rather new to Unity and trying to figure out the best way in a game like mine to move my player, handle collisions and triggers, create solid objects, etc. I'm creating a top down 2D game in the vein of older Zelda games. I shouldn't need any physics really. I've seen three options to handle movement in the engine:
Rigidbodies
CharacterController
Manipulating the transform directly
Honestly, since I don't even use the Z axis in my game, I'd rather just manipulate the transform directly and not worry about physics at all other than triggers and making sure you can't walk through solid objects. I'm unsure if I can use normal capsule colliders with this system. I'm scared to do that because of this section I found in the docs under the section titled Rigidbodies (which seems unclear to me):
https://unity3d.com/learn/tutorials/topics/physics/physics-best-practices
Which states:
The Rigidbody component is an essential component when adding physical interactions between objects. Even when working with colliders as triggers we need to add them to game objects for the OnTrigger events to work properly. Game objects which don’t have a RigidBody component are considered static colliders. This is important to be aware of because it’s extremely inefficient to attempt to move static colliders, as it forces the physics engine to recalculate the physical world all over again. Fortunately, the profiler will let you know if you are moving a static collider by adding a warning to the warning tab on the CPU Profiler.
So I thought I'd be getting better performance by eliminating physics entirely from my game, but this almost sounds like it's the opposite? And then I see questions like these, which makes it sound like using too many Rigidbodies on moving objects creates performance issues instead and there are better ways to do it:
https://forum.unity.com/threads/thousands-of-rigidbodies-in-scene-performance-improvement.535367/
Then there's CharacterController, which nothing I can find is very clear on when to use it. I don't see the point to use it in a 2D game when I can just translate the transform and don't use the Z-axis. Also, it doesn't seem to offer a solution for anything other than the player character (such as enemies).
Can someone give me a little advice here? Will I have performance issues if I just use Transform.translate()? And can I still use the built in 2D colliders if I don't use the 2D Rigidbodies and move them around without performance issues? If not, how do I handle collisions? What's the best practice for something like a 2D top down game with no real physics?
Your answer
Follow this Question
Related Questions
Problem with the Character Controller on the Y-Axis,Character Controller drifting in the Y Axis 0 Answers
Unity2D Help with rigidbody character movement. 0 Answers
two objects collide, but slightly enter into each other. 0 Answers
How do I keep rigidbodies from pushing each other? 2 Answers
How to stop game object movement instantly after collision is detected ? 1 Answer